let read() = stdin.ReadLine() |> int let P1 = read() let P2 = read() let N = read() let R = Array.init N (fun _ -> read()) let lossPerCase = P1+P2 let case = (R |> Array.length) - (R |> Array.distinct |> Array.length) let loss = lossPerCase*case loss |> printfn "%i"