import scala.math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val s = sc.nextLine var x = 1 for (c <- s) c match { case 'L' => x = x * 2 case 'R' => x = x * 2 + 1 } println(x) } }