S = input() print(len(S)*2+1+S.count('0')+S.count('4')+S.count('6')+S.count('8')*2+S.count('9'))