//Compile: g++ -g -Wshadow -Wall main.cpp -o a.exe -Ofast -Wno-unused-result
//Build: g++ -g -Wshadow -Wall main.cpp -o a.exe -D_GLIBCXX_DEBUG
//Compile and run: g++ -g -Wshadow -Wall main.cpp -o a.exe -Ofast -Wno-unused-result && a.exe

#pragma GCC optimize("Ofast")

#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

typedef long long ll;
typedef long double ld;
typedef std::pair<int, int> pii;
typedef std::pair<long, long> pl;
typedef std::vector<int> vi;
typedef std::vector<ll> vl;
typedef std::vector<pii> vpii;
typedef std::vector<pl> vpl;
typedef std::vector<vi> vvi;
typedef std::vector<vl> vll;
typedef std::map<int, int> mii;
typedef std::priority_queue<int> pqd;
typedef std::priority_queue<int, vi, std::greater<int>> pqi;

#define gc getchar_unlocked
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define PI 3.14159265358979323846264
#define MOD 1e9 + 7
#define INF INT64_MAX;

#define fo(i, n) for (ll i = 0; i < n; ++i)
#define Fo(i, k, n) for (ll i = k; k < n ? i < n : i > n; k < n ? ++i : --i)
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define deb(x) cout << '\n' \
                    << #x << " = " << x << '\n'
#define sortall(x) sort(x.begin(), x.end())
#define tr(it, a) for (auto it = a.begin(); it != a.end(); ++it)
#define ps(x, y) std::fixed << std::setprecision(y) << x
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mk(arr, n, type) type* arr = new type[n]

std::mt19937_64 rng(std::chrono::high_resolution_clock::now().time_since_epoch().count());

inline void setup();
inline void solve();

int main() {
    setup();

    ll t = 1;

    // std::cin >> t;

    while (t--) solve(), std::cout << '\n';

    return 0;
}

inline void setup() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

#ifdef LOCAL_PROJECT  //run with -DLOCAL_PROJECT during compilation
    freopen("input.txt", "r", stdin);
#else
#ifndef ONLINE_JUDGE  //runs automatically for supported online judges
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
#endif
}

using namespace std;

// static int dp[100][100];  //n+1 w+1

// int knapsack(int wt[], int val[], int w, int n) {
//     if (n == 0 || w == 0) return 0;  //base condition

//     if (dp[n][w] != -1) return dp[n][w];

//     if (wt[n - 1] <= w)
//         return dp[n][w] = max(val[n - 1] + knapsack(wt, val, w - wt[n - 1], n - 1),
//                               knapsack(wt, val, w, n - 1));
//     return dp[n][w] = knapsack(wt, val, w, n - 1);
// }

// inline void solvea() {
//     int wt[] = {1, 3, 4, 5};
//     int val[] = {1, 4, 5, 7};
//     int w = 4;
//     int n = sizeof(wt) / sizeof(wt[0]);

//     memset(dp, -1, sizeof(dp));

//     fo(i, n + 1) {
//         fo(j, w + 1) {
//             if (i == 0 || j == 0)
//                 dp[i][j] = 0;
//             else if (wt[i - 1] <= j) {
//                 dp[i][j] = max(val[i - 1] + dp[i - 1][j - wt[i - 1]],
//                                dp[i - 1][j]);
//             } else
//                 dp[i][j] = dp[i - 1][j];

//             cout << dp[i][j] << ' ';
//         }
//         cout << '\n';
//     }

//     cout << dp[n][w];

//     // cout << knapsack(wt, val, w, n);
// }

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

    ll ans = 0;
    ll temp = 0;
    fo(i, s.length()) {
        if (s[i] == 'R') {
            ++temp;
        } else {
            temp = 0;
        }

        ans = max(ans, temp);
    }

    cout << ans;
}

Measured memory_bytes: 3652