#include <iostream>
using namespace std;
const int MAX_VALUE = 20;
int main() {
int fr1[MAX_VALUE + 1] = {0};
int flag1 = 1;
int n;
cin >> n;
for (int i = 1; i <= n; ++i) {
int currentElement;
cin >> currentElement;
if (i <= n / 2) {
++fr1[currentElement];
if (fr1[currentElement] > 1) {
flag1 = 0;
}
}
}
if (flag1 == 1) {
cout << 1;
} else {
cout << 2;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1BWF9WQUxVRSA9IDIwOwoKaW50IG1haW4oKSB7CglpbnQgZnIxW01BWF9WQUxVRSArIDFdID0gezB9OwoJaW50IGZsYWcxID0gMTsKCWludCBuOwoJY2luID4+IG47Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlpbnQgY3VycmVudEVsZW1lbnQ7CgkJY2luID4+IGN1cnJlbnRFbGVtZW50OwoJCWlmIChpIDw9IG4gLyAyKSB7CgkJCSsrZnIxW2N1cnJlbnRFbGVtZW50XTsKCQkJaWYgKGZyMVtjdXJyZW50RWxlbWVudF0gPiAxKSB7CgkJCQlmbGFnMSA9IDA7CgkJCX0KCQl9Cgl9CglpZiAoZmxhZzEgPT0gMSkgewoJCWNvdXQgPDwgMTsKCX0gZWxzZSB7CgkJY291dCA8PCAyOwoJfQoJcmV0dXJuIDA7Cn0=