#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define INF 2000000000 using namespace std; int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1}; #define sym cout<<"---------"< #define P pair #define mk make_pair #define en endl #define WHITE 0 #define BLACK 2 #define GRAY 1 #define RE return 0 #define int ll signed main(){ int ans=0; for(int i=0; i<5; i++){ int a; cin>>a; if(a%3==0&&a%5==0) ans+=8; else if(a%3==0) ans+=4; else if(a%5==0) ans+=4; else{ string t=to_string(a); ans+=t.size(); } } cout<