puts gets.chomp.split(//).map.inject(1) { |route, val| val == 'L' ? route * 2 : route * 2 + 1 }