print sum(int(n) for n in str(2**1000))