#a^b + c^d
a=int(input('first number:'))
b=int(input('second nubmer:'))
c=int(input('third nubmer:'))
d=int(input('fourth number:'))
#calculation
x=a**b
y=c**d
z=x+y
#printing the answer
print('answer',z)