function Main(input) {
		let out = 0;
		switch(input.trim()) {
			case 'SSS':
				break;
			case 'SRS':
			case 'RSR':
			case 'RSS':
			case 'SSR':
				out = 1;
				break;
			case 'RRS':
			case 'SRR':
				out = 2;
				break;
			case 'RRR':
				out = 3;
				break;
		}
		console.log(out);
};
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
