#include <iostream>
#include <string>
using namespace std;

int main(){
    int n;
    cin >> n;
    int *nizStr = new int[n-1];
    for (int i = 0; i < n - 1; i++)
        cin >> nizStr[i];

    int *p = (int*)malloc(sizeof(int));
    int res = ((int)p%10);

    cout << res;
}