a = input() array = list(map(int, a)) b = sum(array) array = list(map(int, a)) c = sum(array) print(c)