#include<iostream>
using namespace std;

int num[2001];

bool poss_with(int maxnum, int ostsbor, int last_num_index)
{
    if(num[last_num_index]<ostsbor/maxnum)
    {
        return false;
    }
}

int main()
{
    int S,N,sum=0;
    num[0]=20001;
    cin>>S>>N;
    int minbr=S;
    for(int i=1;i<=N;i++)
    {
        cin>>num[i];
        int j=i;
        while(j!=1 && num[j]>num[j-1])
        {
            swap(num[j],num[j-1]);
            j--;
        }
    }
    cout<<"2"<<endl;
    return 0;
}