n=abs(int(input())) p=n<=10**9 print(sum(int(i) for i in f'{n}' if p else'超出范围')) # 此题提交后报错,提示的输入数值已超10的9次方的范围,答案未将描述中n的范围考虑进去