let INPUT_FILE = @"/var/result/data.txt"
let OUTPUT_FILE = @"/var/result/result.txt"

let getNumbersFromFile(path: string): seq<int> =
    System.IO.File.ReadLines(path)
        |> Seq.map int

let getCountOfMaxNumber(numbers: seq<int>): int =
    numbers
        |> Seq.max
        |> fun maxNum -> Seq.filter ((=) maxNum) numbers
        |> Seq.length

let numbers = getNumbersFromFile(INPUT_FILE)
let count = getCountOfMaxNumber(numbers)
System.IO.File.WriteAllText(OUTPUT_FILE, string count)
