/* -*- coding: utf-8 -*- * * 637.cc: No.637 X: Yet Another FizzBuzz Problem - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int N = 5; /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int sum = 0; for (int i = 0; i < N; i++) { int ai; scanf("%d", &ai); if (ai % 15 == 0) sum += 8; else if (ai % 3 == 0 || ai % 5 == 0) sum += 4; else while (ai > 0) { sum++; ai /= 10; } } printf("%d\n", sum); return 0; }