use std::collections::HashSet; fn main() { let mut xx = String::new(); std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok(); let xx: Vec = xx.split_whitespace().flat_map(str::parse).collect(); let n_duplicate = xx[2] - xx[3..].iter().collect::>().len(); println!("{}", n_duplicate * (xx[0] + xx[1])); }