let (|FizzAndBuzz|FizzOrBuzz|Other|) n = match n%3,n%5 with | 0,0 -> FizzAndBuzz | 0,_ | _,0 -> FizzOrBuzz | _ -> Other let fizzBuzzStr = function | FizzAndBuzz -> 4 | FizzOrBuzz -> 2 | Other -> 0 let N = stdin.ReadLine() |> int [1..N] |> List.sumBy(fizzBuzzStr) |> printfn "%i"