n = input() ans = 1 c = [2 for i in range(0,10)] c[0]+=1 c[4]+=1 c[6]+=1 c[8]+=2 c[9]+=1 for s in n: ans += c[ord(s)-ord('0')] print(ans)