|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||17||8||7||43.750%|
Before sport contest event all participants are lined up, each one is turned left or right. Simultaneously, all participants in the row who at present are facing each other shake hands and then turn around to face the participant on their other side. The time for one handshake and a turn is 1 second. The rest of the players keep their orientation. Then follow new handshakes and turnings, etc.
The event will begin when the handshakes end. If they finish at all.
From the standard input is read a string of letters L and R, where L means a player, turned to the left at the starting moment, while R means a player turned to the right. The length of the sting is 100000 at max.
At the standard output to be brought out divided by space: the time for the handshakes and all handshakes made by the players. If the handshakes never cease then to be brought out NEVEREND.