c = int(input()) zero = c.count(0) print(len(c) - zero - 1)