package main import ( "fmt" ) func main() { var s string r := 1 fmt.Scanln(&s) for _, v := range s { if v == 'L' { r *= 2 } else { r = r*2 + 1 } } fmt.Println(r) }