x = input() y = list(x) z = list(map(int, y)) s = (z[0]+z[1]+z[2]) print(s)