class Counter: def __init__(self): self.d = { "0": 1, "4": 1, "6": 1, "8": 2, "9": 1 } self.n = 1 def __call__(self, s): for c in s: if c in self.d: self.n += self.d[c] self.n += (len(s)*2) print(self.n) s = input() counter = Counter() counter(s)