let fact n =
  if n = 0 || n = 1 then 1
  else
    let rec doit i x y =
      if i = n then x + y
      else doit (i + 1) y (x + y)
    in
    doit 2 1 1

let () =
  let n = read_int () in
  Printf.printf "%d\n" (fact n)