#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
	int n,x;
	cin >> n >> x;
	string a;
	int i=0;
	while(true)
	{
			
			cin >> a;	
			i++;
			if (i==n*n)
				break;
	}
	int v = rand() % 10 + x;
	cout << v;
}