#include #include #include using namespace std; int main() { int a[5]; int ans = 0; for(int i=0;i<5;i++) cin >> a[i]; for (int i = 0; i < 5; i++) { if (a[i] % 15 == 0) { ans += 8; } else if (a[i] % 3 == 0 || a[i] % 5 == 0) ans += 4; else ans += a[i] / 10; } cout << ans << endl; //cin >> N; return 0; }