def main(): S = input() c = 0 for s in S: for i in range(10): if s == str(i): c += i break print(c) if __name__ == "__main__": main()