n = int(input(),16)
print(n)