1 #include <iostream> 2 using namespace std; 3 int main() { 4 char x,y,z; 5 cin>>x>>y>>z; 6 //RRR || SSS 7 if(x==y&&y==z&&x=='R') { 8 cout<<3; 9 } 10 else if((x==y ||y==z)&&y=='R') 11 { 12 //RRS || SRR 13 cout<<2; 14 } 15 else if(x=='R'||y=='R'||z=='R') 16 { 17 //SSR || SRS || RSS 18 cout<<1; 19 } 20 else 21 cout<<0; 22 }