#include #include int main(void) { bool isFound = false; int num; int check_num = 0; while (~scanf("%d", &num)) { check_num++; if (num != check_num) { printf("%d\n", check_num); isFound = true; break; } } if (isFound == false) printf("%d\n", check_num); return 0; }