#include using namespace std; int main(){ int i,n; for(i=1; i<10; i++){ cin >> n; if(n!=i){ break; } } cout << i << endl; }