#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int ans=0;
	string S;
	cin>>S;
	if(S=="RRR")ans=3;
	else if(S=="SRR" || S=="RRS")ans=2;
	else if(S=="SSS")ans=0;
	else ans=1;
	cout<<ans;
	return 0;
}