a = gets.to_i
#n = 10 ** 5
n = 2

def power2(a, n)
  return 1 if n == 0
  k = power2(a, n >> 1)
  k *= k
  return k if n & 1 == 0
  return k * a
end

sum = 0
(0..n).each{|i|
  #sum += power2(a, i)
  sum = power2(a, i)
}
#sum == a ** (n + 1) / (a - 1)
puts sum.to_i 