#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, count = 0;
  cin >> n;
  int arr[200];
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + 200);
  for (i = 0; i < n; i++) {
    if (arr[i] != arr[i + 1]) {
      count = 0;
    } else if (arr[i] == arr[i + 1]) {
      count = 1000000;
    }
  }
  cout << count << endl;
  return 0;
}
