r = [3,2,2,2,3,2,3,2,4,3] print(sum(r[i] for i in map(int,input()))+1)