#include #define N 10 int main(void){ int n1 = 0, n2; while(1){ scanf("%d ", &n2); if(n2-n1 != 1) break; n1 = n2; } printf("%d\n", n1+1); return 0; }