/**
#include <stdio.h>
int n, m, cnt = 0;
int map[8][8] = {};
void dfs(int i, int j, int num)
{
if (i < 1 || i > 7 || j < 1 || j > 7 || map[i][j] != num)
{
return ;
}
cnt ++;
map[i][j] = 0;
dfs(i - 1, j, num);
dfs(i, j + 1, num);
dfs(i + 1, j, num);
dfs(i, j - 1, num);
}
int main()
{
int i, j, k;
int answer = 0;
for (i = 1 ; i <= 7 ; i ++)
{
for (j = 1 ; j <= 7 ; j ++)
{
scanf("%d", &map[i][j]);
}
}
for (i = 1 ; i <= 7 ; i ++)
{
for (j = 1 ; j <= 7 ; j ++)
{
if (map[i][j] != 0)
{
dfs(i, j, map[i][j]);
if (cnt >= 3)
{
answer ++;
}
cnt = 0;
}
}
}
printf("%d", answer);
return 0;
}
#include <stdio.h>
typedef struct
{
int x;
int y;
}q;
q queue[101] = {};
int map[102][102] = {};
int rear = -1, front = -1;
int x1, y1;
int cnt = 0, n;
void enq(int i, int j){
// 범위넘어가거나 0이면 return
if (i > n || i < 1 || j > n || j < 1 || map[i][j] == 0)
{
return ;
}
cnt ++;
rear ++;
queue[rear].x = i;
queue[rear].y = j;
map[i][j]=0;
}
void deq()
{
front++;
x1 = queue[front].x;
y1 = queue[front].y;
}
void bfs(int i, int j){
/// arr[i][j]에서 bfs 시작
enq(i, j);
while (rear != front)
{
deq();
/// deq한 point에서 네 방향 enq
enq(x1 - 1, y1);
enq(x1, y1 + 1);
enq(x1 + 1, y1);
enq(x1, y1 - 1);
}
}
int main()
{
int i, j;
int answer[101] = {}, top = 0;
scanf("%d", &n);
for (i = 1 ; i <= n ; i ++)
for (j = 1 ; j <= n ; j ++)
scanf("%1d", &map[i][j]);
for (i = 1 ; i <= n ; i ++){
for (j = 1 ; j <= n ; j ++){
if(map[i][j]==1){
bfs(i,j);
answer[++top] = cnt;
cnt = 0;
answer[0] ++;
}
}
}
for (i = 1 ; i <= top ; i ++)
{
for (j = 1 ; j <= top - i ; j ++)
{
if (answer[j] > answer[j + 1])
{
int p = answer[j];
answer[j] = answer[j + 1];
answer[j + 1] = p;
}
}
}
for (i = 0 ; i <= top ; i ++)
{
printf("%d\n", answer[i]);
}
return 0;
}
**/
#include <stdio.h>
int main()
{
}