#include<bits/stdc++.h>
 
using namespace std;
 
using ll = long long;
using ld = long double;
using mat = vector<vector<int>>;
 
//first index is rows
//second index is cols
// void matmul(mat &a , mat &b , mat &c)
// {
//     int p = a[0].size();
//     if(b.size() != p || a.size() == 0 || b.size() == 0)
//     {
//         // mat c(1 , vector<int> (1 , -1));
//         return;
//     }
//     else
//     {
//         // mat c( a.size() , vector<int>(b[0].size() , 0) );
//         c.resize(a.size());
//         for(int i=0;i<a.size();i++)
//         {
//             c[i].resize(b[0].size());
//             for(int j=0;j<c[i].size();j++)c[i][j]=0;
//         }
//         for(int i=0;i<a.size();i++)
//         {
//             for(int j=0;j < b[0].size();j++)
//             {
//                 for(int k=0;k<p;k++)
//                 {
//                     c[i][j] += a[i][k]*b[k][j];
//                 }
//             }
//         }
//     }
// }
 
 
ll fast_pow( ll a , ll b , ll m )
{ 
    ll res=1;
    a = a%m;
    while(b>0)
    {
        if(b&1) res =  (res*a)%m;
        a=(a*a)%m;
        b=b/2;
    }
    return res;
}
 
template <typename T,typename U>                                                   
std::pair<T,U> operator-(const std::pair<T,U> & l,const std::pair<T,U> & r) {   
    return {l.first-r.first,l.second-r.second};                                    
} 
 
template <typename T,typename U>                                                   
std::pair<T,U> operator+(const std::pair<T,U> & l,const std::pair<T,U> & r) {   
    return {l.first+r.first,l.second+r.second};                                    
} 
 
const ll inf = 10000000000000LL;
//const ll MOD = 1e9+7LL;
int ns;
 
ll lcm(ll a , ll b)
{
    return (a*b)/__gcd(a ,b);
}
 
/*
    java implementation of highestOneBit and NumberOfTrailingZeroes
*/
 
ll highestOnebit(ll x)
{
    x |= (x>>1);
    x |= (x>>2);
    x |= (x>>4);
    x |= (x>>8);
    x |= (x>>16);
    x |= (x>>32);
    
    return x-((unsigned ll)x>>1);
}   
 
int numberOfTrailingZeros(ll i)
{
    if (i == 0) return 64;
    ll x = i;
    ll y;
    int n = 63;
    y = x << 32; if (y != 0) { n -= 32; x = y; }
    y = x << 16; if (y != 0) { n -= 16; x = y; }
    y = x <<  8; if (y != 0) { n -=  8; x = y; }
    y = x <<  4; if (y != 0) { n -=  4; x = y; }
    y = x <<  2; if (y != 0) { n -=  2; x = y; }
    return (int) (n - ((unsigned ll)(x << 1) >> 63));
}
 
ll MOD = 998244353LL;
ll imod = 748683265LL;
 
 
 
 
int main()
{
    // freopen( "input.txt" , "w" , stdout );
    
   
 
    srand(time(0));
    // Using time point and system_clock 
    std::chrono::time_point<std::chrono::system_clock> start, end; 
  
    start = std::chrono::system_clock::now(); 
 
 
    //------- INPUT GENERATION ------
 
    // cout<<200000<<endl;
 
    //------- /INPUT GENERATION ------
 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
 
    string s;
    cin>>s;
    int ctr=0;
    int mx=0;
    for(int i=0;i<3;i++)
    {
        if( s[i] == 'R' )
        {
            ctr++;
        }
        else 
        {
            mx = max(ctr , mx);
            ctr=0;
        }
    }

    mx = max(ctr , mx);

    cout<<mx<<endl;
 
    
 
        
        
 
    
    
 
 
 
 
    // cout<<endl;
    // end = std::chrono::system_clock::now(); 
  
    // std::chrono::duration<double> elapsed_seconds = end - start; 
    // std::time_t end_time = std::chrono::system_clock::to_time_t(end); 
  
    // std::cout << "finished computation at " << std::ctime(&end_time) 
    //           << "elapsed time: " << elapsed_seconds.count() << "s\n"; 
 
 
 
 
}

Measured memory_bytes: 3668