#ifdef PENIS_DETROV
    #include <iostream>
    #include <vector>
    #include <string>
    #include <set>
    #include <map>
    #include <algorithm>
    #include <utility>
    #include <cmath>
    #include <iomanip>
    #include <stack>
    #include <deque>
    #include <queue>
    #include <cstdio>
    #include <unordered_map>
    #include <unordered_set>
    #include <numeric>
    #include <cassert>
    #include <ext/rope>
    #include <random>
    #include <ctime>
    #include <chrono>
    #include <cassert>
    #include <stdio.h>
    #include <stdlib.h>
    #include <windows.h>
#else
    #include<bits/stdc++.h>
#endif

#define int long long
#define f first
#define s second
#define sz(x) (int)(x.size())
#define pb push_back
#define vec vector
#define all(x) (x).begin(), (x).end()
#define ld long double
#define rall(x) (x).rbegin(), (x).rend()
#define pii pair< int, int >
#define psi pair< string, int >
#define pss pair< string, string >
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rz resize
#define ins insert
#define endl "\n"
#define FOR( i, n ) for( int i = 0 ; i < (n) ; i++ )
#define INF 1e18
#define inf 1e12
#define sum( a ) accumulate( all( a ), (int)0 )
#define rep( i, a, b ) for( int i = a ; i < b ; i++ )

using namespace std;
using namespace __gnu_cxx;

template <class T>
istream& operator >> ( istream & in, vec< T > & a )
{
    for ( auto & i : a )
        in >> i;
    return in;
}

template <class T>
ostream& operator << ( ostream & out, vec< T > & a )
{
    for ( auto & i : a )
        out << i << ' ';
    return out;
}

template < class T, class U >
istream& operator >> (istream & in, vec< pair < T, U > > & a )
{
    for ( auto & i : a )
        in >> i.f >> i.s;
    return in;
}

template <class T, class U>
ostream& operator << ( ostream & out, vec< pair < T, U > > & a )
{
    for ( auto & i : a )
        out << i.f << ' ' << i.s << endl;
    return out;
}

template <class T, class U>
ostream& operator << ( ostream & out, pair< T, U > &a )
{
    out << a.f << ' ' << a.s << endl;
    return out;
}

template < class T, class U >
istream& operator >> (istream & in, pair< T, U > &a )
{
    in >> a.f >> a.s;
    return in;
}

#ifdef FelixDzerzhinsky
    #define dbg(x) cout << (#x) << "\t" << (x) << endl
#else
    #define dbg(x) 238
#endif

#ifdef FelixDzerzhinsky
    mt19937 rnd(345345);
#else
    mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif

int max( int a, int b )
{
    if( a > b )
    {
        return a;
    }
    return b;
}

int min( int a, int b )
{
    if( a < b )
    {
        return a;
    }
    return b;
}

void start()
{
    freopen( "prizes.in", "r", stdin );
    freopen( "prizes.out", "w", stdout );
}

void Ios()
{
    ios_base::sync_with_stdio( 0 );
    cin.tie( 0 );
    cout.tie( 0 );
}

void solve()
{
    string s;
    cin >> s;

    int cnt = 0;

    int mx = 0;

    FOR( i, sz(s) )
    {
        if( s[i] == 'R' )
        {
            cnt++;
        }
        else
        {
             mx = max( mx, cnt );
             cnt = 0;
        }
    }

    mx = max( mx, cnt );
    cout << mx;
}

signed main()
{
    //start();
    Ios();

    int q = 1;
    //cin >> q;

    while( q-- )
    {
        solve();
    }
}











Measured memory_bytes: 3652