import math
num = 1000001
arr = [0]*50
i = -1
total = 0
while(num != 0):
i += 1
arr[i] = num % 10
num = math.floor(num / 10)
for j in range(i, -1, -1):
total += arr[j] * math.pow(2, j)
print("Decimal number of 1000001 (binary) is %d" % math.floor(total))