#include using namespace std; int main(){ int B[9]; for(int i=1; i<9; i++){ cin >> B[i]; if(B[i]!=i){ cout << i << endl; break; } } return 0; }