local function solve(a)
  local cnt = 0
  while 2 < a do
    a = (a - 1) // 2
    cnt = cnt + 1
  end
  return cnt
end

local x = io.read("*n")
local a = 2

local min, max = 2, 100000000000000000
while 1 < max - min do
  local mid = (min + max) // 2
  if solve(mid) <= x then
    min = mid
  else
    max = mid
  end
end
print(max - 1)
