#include using namespace std; int main(){ int count=0; for(int i=0;i<5;i++){ int n; cin >> n; if(n%3!=0 && n%5!=0){ if(n<10) count+=1; else if(n<100) count+=2; else count+=3; }else{ if(n%3==0) count+=4; if(n%5==0) count+=4; } } cout << count << endl; }