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