b1 = int(input())
q = int(input())
n = int(input())

print(b1*q**(n-1)) # ուշադրություն դարձրեք որ երկու աստանիշով ենք գրում qի n-1 աստիճանը