use std::collections::HashSet; fn main() { let mut nk = String::new(); std::io::stdin().read_line(&mut nk).ok(); let nk: Vec = nk.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let n = nk[0]; let k = nk[1]; let mut a = String::new(); std::io::stdin().read_line(&mut a).ok(); let a: Vec = a.trim().split_whitespace().map(|s| s.parse().unwrap()).collect(); let mut result = HashSet::new(); for i in 1..1usize<> j) & 1) == 1).map(|j| a[j]).sum::(); let mulval = (0..n).filter(|&j| ((i >> j) & 1) == 1).map(|j| a[j] as u128).fold(1u128, |x, y| x * y); result.insert(addval as u128); result.insert(mulval); } println!("{}", result.len()); }