#include using namespace std; using ll = long long; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b void vprint(T &V){ for(auto v : V){ cout << v << " "; } cout << endl; } int main(){ cin.tie(0); ios::sync_with_stdio(false); // 正しい値 ll A[10] = {20104, 20063, 19892, 20011, 19874, 20199, 19898, 20163, 19956, 19841}; // input string s; cin >> s; vector B(10); for(char c : s){ if(isdigit(c)){ ll v = c - '0'; B[v]++; } } ll excess; ll shortage; FOR(i, 0, 10){ if(A[i]>B[i]){ shortage = i; } if(A[i]