using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Takmicenje
{
    internal class Program
    {


        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int[,] nm = new int[int.Parse(s.Split(' ')[0]), int.Parse(s.Split(' ')[1])];
            for (int i = 0; i < nm.GetLength(0); i++)
            {
                s = Console.ReadLine();
                for (int j= 0; j < nm.GetLength(1); j++)
                {
                    nm[i, j] = int.Parse(s.Split(' ')[j]);
                }
            }
            Console.WriteLine("1");

        }
    }
}