x = eval(input())

print((int(x)**3))



n = int(eval(input()))

print((n*n*n))

x = eval(input())
print((int(x) ** 3))

n = int(eval(input()))
print((n * n * n))

-x = eval(input()) -print((int(x) ** 3)) +n = int(eval(input())) +print((n * n * n))