(define root (string->list (read))) (print (let loop ((r root) (ans 1)) (cond ((null? r) ans) ((equal? #\L (car r)) (loop (cdr r) (* ans 2))) ((equal? #\R (car r)) (loop (cdr r) (+ (* ans 2) 1))))))