#include using namespace std; int main() { int res=0; for(int a; cin>>a; res+=4*!(a%5)+4*!(a%3)) if (a%5 && a%3) res+=size(to_string(a)); cout<