s = input() print(sum(x=='1' for x in s))