/** * author: TakeruOkuyama * created: 2020-04-09 14:53:46 **/ #include #define rep(i, n) for(int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair; const int MOD = 1000000007; int main(){ vector a(5); int ans = 0; rep(i, 5){ cin >> a[i]; if(a[i] % 3 == 0 && a[i] % 5 == 0){ ans += 8; }else if(a[i] % 3 == 0){ ans +=4; }else if(a[i] % 5 == 0){ ans +=4; }else{ ans += (to_string(a[i])).size(); } } cout << ans << endl; return 0;} /** * g++ code.cpp * ./a.out * shift + ctrl + i **/