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