#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; int anotherFizzBuzz(int x) { if (x % 15 == 0) return 8; if (x % 3 == 0 and x % 5 != 0) return 4; if (x % 3 != 0 and x % 5 == 0) return 4; return log10(x) + 1; } void solve() { int x, ans = 0; rep(i, 0, 5) { cin >> x; ans += anotherFizzBuzz(x); } cout << ans << endl; } int main() { cin.tie(0); ios::sync_with_stdio(false); solve(); }