#include <bits/stdc++.h>
// #define int long long
using namespace std;
using ll = long long;
using ull = unsigned long long;
signed main()
{
// ios::sync_with_stdio(false);
// cin.tie(0);
// cout.tie(0);
// freopen(".in", "r", stdin);
// freopen(".out", "w", stdout);
string s;
cin >> s;
int cnt = 0;
for (char a : s)
{
cnt += (a == 'R');
}
cout << cnt << endl;
return 0;
}