#include<stdio.h>
#include<iostream>
#include<string>
#include<string.h>
#include<map>
using namespace std;
const int N = 510;
bool line[N][N],used[N];
int link[N];
int n, m, nn, mm;
bool find(int x)
{
for (int i = 1; i <= 53; i++)
{
if (line[x][i] == true && used[i] == false)
{
used[i] = true;
if (link[i] == -1 || find(link[i]))
{
link[i] = x;
return true;
}
}
}
return false;
}
int answer()
{
int num = 0;
for (int i = 1; i <= 53; i++)
{
memset(used, 0, sizeof(used));
if (find(i))
{
num++;
}
}
return num;
}