#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); vector B={20104,20063,19892,20011,19874,20199,19898,20163,19956,19841}; string s; cin>>s; int n=s.size(); vector A(10); rep(i,n){ if(i==1) continue; A[s[i]-'0']++; } int a,b; rep(i,10){ if(A[i]>B[i]) a=i; if(A[i]