#include <iostream>

using namespace std;

int main()
{
    int n,k;
    cin >> n >>k;
    int a[n];
    int h = sizeof(a) / sizeof(a[0]);
    for (int i = 0; i < n; i++) {
        cin >> a[i]; 
}
    if(n == 2)
    cout<<a[h-1];
    if(n != 2)
    cout<<n;


    return 0;
}