#include int main() { int num,tempnum,ans; scanf("%d", &num); ans = 1; while (num != 0) { tempnum = num % 10; num /= 10; switch (tempnum) /*fall through*/ { case(8): ans++; case(0): case(4): case(6): case(9): ans++; default: ans += 2; } } printf("%d\n", ans); }