#include using namespace std; int main() { int ans = -1; for (int i = 1; i < 10; ++i) { int b; cin >> b; if (b != i && ans == -1) { ans = i; } } cout << (ans > 0? ans: 10) << '\n'; return 0; }