fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let (mut w, mut d, mut o) = (1u8, 1, 1); for c in s.trim().chars() { match c { 'a' | 's' => w *= 2, 'l' | 'o' => d *= 2, _ => o = 0, } } println!("{}", ((w - 1) * (d - 1)).saturating_sub(o)) }