-- $Id: fibo.lua,v 1.2 2000/12/24 19:10:50 doug Exp $
-- http://www.bagley.org/~doug/shootout/
-- contributed by Roberto Ierusalimschy

function fib(n)
    if (n < 2) then return 1 end
    return fib(n-2) + fib(n-1)
end

N = tonumber((arg and arg[1])) or 1
print(fib(N))