fun main() { var n = 1 readLine()!!.forEach { if (it == 'L') n *= 2 else if (it == 'R') n = n*2 + 1 } println(n) }