digitSum = 0 for i in str(2**1000): digitSum += int(i) print(digitSum)