#include <iostream>
#include <vector>

using namespace std;

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);

  vector<int> v(11,0);
  int n;
  for(int i = 0; i < 9; i++){
    cin >> n;
    v[n] = 1;
  }
  for(int i = 1; i <= 10; i++){
    if(v[i] == 0){
      cout << i << endl;
      break;
    }
  }

  return 0;
}