let str = Console.ReadLine() match int.TryParse str with | true, num -> printfn "%i" num | _ -> failwithf "'%s' is not an integer" str