import strutils, tables proc ri: int = stdin.readLine.parseInt let P1, P2, N = ri() var R = initCountTable[int]() for n in 1 .. N: R.inc ri() echo (N - R.len) * (P1 + P2)