module Main where import System.Environment (getArgs) usage = "Fibonacci: I need 1 Parameter \"n\"::Int to tell you the number of recursive calls needed to compute the n-th Fibonacci number" main :: IO () main = do args <- getArgs if length args < 1 then putStrLn usage else print $ nfib (read (head args)) nfib :: Int -> Int nfib n | n <= 1 = 1 | otherwise = n1 + n2 + 1 where n1 = nfib (n-1) n2 = nfib (n-2)