#include <bits/stdc++.h>

using namespace std;

long long n, k, v[1000001], nr, i, j, maxi;

int main()
{
    cin >> n >> k;

    for ( i = 1; i <= n; i++ ) {
        cin >> v[i];
        maxi = max ( maxi, v[i] );
    }
    if ( maxi == 1 ) {
        cout << "1";
    }

    return 0;
}
