#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); for(int i = 0; i < 10; i++) { int t; cin >> t; if(t != i + 1) { cout << i + 1 << '\n'; return 0; } } return 0; }