#include using namespace std; int main() { long i; vector b(9); for(i=0; i<9; i++){ cin >> b[i]; } sort(b.begin(),b.end()); for(i=0; i<9; i++){ if(b[i]!=i+1){ cout << i+1 << endl; return 0; } } return 0; }