#include int main(void){ int x; int a = 1; while(1){ scanf("%d", &x); if(x != a){ printf("%d\n", a); break; } a++; } return 0; }