#include using namespace std; signed main(){ int ans=0; vector v(5); for(int i=0;i<5;i++)cin>>v[i]; for(int p:v){ if(p%3==0)ans+=4; if(p%5==0)ans+=4; if(p%3&&p%5)ans++; } cout<