table = [3, 2, 2, 2, 3, 2, 3, 2, 4, 3] ans = 0 n = input() for k in n: ans += table[int(k)] print(ans + 1)