#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef vector VVL; typedef pair P; typedef pair PL; typedef vector VD; int calc(int x){ bool t = (x % 3 == 0); bool f = (x % 5 == 0); if (t && f) return 8; if (t) return 4; if (f) return 4; if (x < 10) return 1; if (x < 100) return 2; return 3; } int main() { int a = 0; REP(i,5){ int x; cin >> x; a += calc(x); } cout << a << endl; return 0; }