Geometric Progression

Problem Statement

Given a real number a and a natural number n, compute the sum:

1 + a + a² + … + aⁿ

You are not allowed to use the formula for the sum of a geometric progression or the exponentiation operator.

The program’s running time must be proportional to n.

Input

Two numbers: a and n.

Output

Print the value of the sum.

Example

input output
2
2
7