inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
s = inp.shift()
m = c = 0
for (i=0; i<3; i++) {
    if (s[i] == "R") {
        c++
    } else {
        c = 0
    }
    if (c > m) {
        m = c
    }
}
console.log(m)