#include using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) typedef long long ll; typedef vector vi; typedef vector vvi; #define pii pair #define piii pair #define mp make_pair #define pb push_back #define ALL(a) (a).begin(),(a).end() #define FST first #define SEC second const int INF = (INT_MAX/2); const double eps = 1e-14; const double PI = M_PI; #define DEB cout<<"!"<> input; ll ans = 0; for(int i = 0; i < input.size(); i++){ stringstream ss; ss << input[i]; int index; ss >> index; ans += table[index]; } cout << ans - input.size() + 1<< endl; return 0; }