#include<bits/stdc++.h>

#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 500005
#define all(x) x.begin(),x.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

using namespace std;

#define rt return

void test_case(){
  
  string s; cin >> s;
  int cnt = 0, ans = 0;
  for(int i = 0; i < 3; i++){
    if(s[i] == 'R') cnt++;
    else{
      ans = max(ans, cnt);
      cnt = 0;
    }
  }
  ans = max(ans, cnt);
  cout << ans;
}

int32_t main(){
	IOS;
	int tt = 1; 
	//cin >> tt;
	while(tt--){
    test_case();
    cout << endl;
	}
	return 0;
}

#include <iostream>
#include <vector>
using namespace std;
int main(){
    int N;
    cin >> N;
    vector<int> num(55556);
    for(int i = 0; i < 55556; i++) num[i] = i;
    num[0] = -1;
    num[1] = -1;
    for(int i = 2; i < 55556; i++){
        if(num[i] == -1) continue;
        int t = 2;
        while(i * t <= 55555){
            num[i * t] = -1;
            t++;
        }
    }
    vector<int> sosuu;
    for(int i = 0; i < 55556; i++){
        if(num[i] != -1) sosuu.push_back(num[i]);
    }
    vector<int> cnt(5, 0);
    for(int i = 0; i < sosuu.size(); i++){
        cnt[sosuu[i] % 5]++;
    }
    int t = 0;
    for(int i = 0; i < sosuu.size(); i++){
        if(t == N) break;
        if(sosuu[i] % 5 == 1) {
            cout << sosuu[i] << ' ';
            t++;
        }
    }
    cout << endl;
}