#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
	string S;
	cin >> S;
	long long streaks = 0;
	long long max_streaks = 0;
	for (auto s : S) {
		if (s == 'R') {
			++streaks;
		}
		else {
			max_streaks = max(streaks, max_streaks);
			streaks = 0;
		}
	}
	max_streaks = max(streaks, max_streaks);

	cout << max_streaks << endl;
	return 0;
}
#include <iostream>

using namespace std;

int main()
{
    string s;
    cin >> s;
    if ((s[0] == 'R') && (s[1] == 'R') && (s[2] == 'R')) {
        cout << "3";
    }
    else if (((s[0] == 'R') && (s[1] == 'R')) || ((s[1] == 'R') && (s[2] == 'R'))) {
        cout << "2";
    }
    else if (s[0] == 'R' || s[1] == 'R' || s[2] == 'R') {
        cout << "1";
    }
    else
        cout << "0";

    return 0;
}