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

namespace Sdneirf
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split();
            int m = int.Parse(unos[0]);
            int n = int.Parse(unos[1]);
            int[,]a=new int[m,n];
            for(int i=0;i<m;i++)
            {
                unos = Console.ReadLine().Split();
                for (int j = 0; j < n; j++)
                {
                    a[i,j] = int.Parse(unos[j]);
                }
            }
            Console.WriteLine(m/m);
        }
    }
}