import std.algorithm, std.array, std.container, std.range; import std.string, std.conv; import std.math, std.bigint, std.bitmanip, std.random; import std.stdio, std.typecons; void main() { auto s = readln.chomp; auto r = reduce!((a, c) => a * 2 + (c == 'L' ? 0 : 1))(1, s); writeln(r); }