P=int(input()) K=int(input()) Z=int(input()) if P>0: p=P**3 else: if P<0: p=P+K else: p=P-Z print(p)
7