#yukicoder No.1076 寿司打 import math p = float(input()) prv = 1 ans = 0 for i in range(10000000): prv = prv * p ans += prv print(math.ceil(ans))