#include using namespace std; using ll=long long; using ull=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int fD[10] = {6,2,5,5,4,5,6,4,7,6}; int f(const string& S){ int res=0; for(char c:S){ if(c=='-') res+=1; if('0'<=c && c<='9') res+=fD[c-'0']; } return res; } int f(int S){ int res=0; if(S==0) return 6; if(S<0){ res+=2; S*=-1; } while(S!=0){ res+=fD[S%10]; S/=10; } return res; } int main(){ string P,N; cin>>P>>N; int Nd=0; if(N.size()>=3) Nd=1000; else Nd=stod(N); int A=0; if(Nd==0) cout<