// yukicoder: No.791 うし数列 // 2019.4.12 bal4u #include int main() { int c, ans; if (getchar() != '1') goto ng; ans = 0; while (1) { c = getchar(); if (c < '0') break; if (c != '3') goto ng; ans++; } printf("%d\n", ans); return 0; ng: puts("-1"); return 0; }