import std.container;
import std.range;
import std.algorithm;
import std.array;
import std.string;
import std.conv;
import std.stdio;
import std.container;

void main() {
	auto s = readln.chomp;
	auto c = s.count!(x => x == 'R');

	if (c == 2 && s[1] != 'R') {
		writeln(1);
	} else {
		writeln(c);
	}
}
