#include <stdio.h> #include <string.h> int main() { char num[10100001]; scanf("%s", num); int len = strlen(num); int ans = 0; for (int i = 1; i < len; i++) { int left = 0, right = 0; for (int j = 0; j < i; j++) { left = (num[j]-'0'); } for (int j = i; j < len; j++) { right = (num[j]-'0'); } if ((left + right) % 2 == 0) { ans++; } } printf("%d\n", ans); return 0; }