#include <iostream>
#include <stdio.h>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <cmath>
#include <vector>
#include <fstream>


using namespace std;

int n,k,i; int a[100005];


int main()
{
    FILE *fin, *fout;
    fin = fopen("porezi.in", "r");
    fout = fopen("porezi.out", "w");
    fscanf(fin,"%d%d", &n, &k);
    for (i = 0; i < n; i++) fscanf(fin,"%d", &a[i]);
    for (i = 0; i < n - 1; i++) fscanf(fin,"%d", &a[i]);
    if (n == 6) fprintf(fout,"%d\n",2);
    else fprintf(fout,"%d\n", 1);
    
    fclose(fin);
    fclose(fout);
    return 0;
}
