import scala.io.StdIn.readLine @main def yuki104() : Unit = println(readLine.foldLeft(1) { (r, c) => if c == 'L' then 2 * r else 1 + 2 * r })