# -*- coding: utf-8 -*- from queue import Queue import sys import subprocess import json import time import math import re #import sqlite3 import random #import numpy as np #from sklearn.datasets import fetch_mldata #from statistics import mean, median, variance, stdev #from chainer import cuda, Variable, FunctionSet, optimizers #import chainer.functions as F str1 = input() # 0 1 2 3 4 5 6 7 8 9 list1 = [1, 0, 0, 0, 1, 0, 1, 0, 2, 1] list2 = [v + 2 for v in list1] ans = 0 for i in range(len(str1)): ans += list2[int(str1[i])] print(ans + 1)