import Foundation

let str: String = readLine()!

var count: Int = 0

for i in 0...2{
	if(str[str.index(str.startIndex, offsetBy: i)] == "R"){
  		count = 1
	}
}

for i in 1...2{
  if(str[str.index(str.startIndex, offsetBy: i)] == "R" && str[str.index(str.startIndex, offsetBy: i-1)] == "R"){
    count += 1
  }
}

print(count)