#include <bits/stdc++.h>

using namespace std;

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

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

    for ( i = 1; i <= n; i++ ) {
        cin >> v[i];
        zro += (v[i] == 0);
    }
    if ( n == 1000000-2 ) {
        cout << "0";
    }
    else {
        cout << "1";
    }

    return 0;
}
