#include int main(void){ int i,n,f = 1; for(i = 1;i <= 9;i++){ scanf("%d",&n); if((i != n) && f){printf("%d\n",i);f=0;} } if(f){printf("10\n");} return 0; }