#include using namespace std; typedef long long ll; #define loop(i,a,b) for(i=a;i=b;i--) #define vi vector #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector const int inf=1000000001; const ll INF=1e16; #define MOD 1000000007 #define mod 1000000009 #define pi 3.14159265358979323846 int main(){ string n; int i; cin>>n; ll sum=0; loop(i,0,n.size()){ if(n[i]=='0'||n[i]=='4'||n[i]=='6'||n[i]=='9'){ sum+=3; }else if(n[i]=='8'){ sum+=4; }else{ sum+=2; } } sum++; cout<