Fix My BOT
A BOT is at point(0,0) of coordinate axes and facing towards positive X.
It gets an instruction string (S) which contains of letters 'F','L' and 'R'.
if S[i] is F: Bot moves forward 1 unit in the facing direction.
if S[i] is R: Bot turns right.
if S[i] is L: Bot turns left.
The operator who was responsible for feeding the instruction string into the Bot,made an error.
He made the error at exactly one place in the actual string
eg: If The actual instruction string was FF, the operator could have fed it as LF,RF,FR,FL .
You are supposed to tell that how many different end locations are possible for the BOT.
Length of the String <=10000
Input will conatain many test cases(<=100) .Read Till EOF.
Each Test case will conatain a string containg only of letters F,L and R.
For each test case,Output number of different end locations for the Bot.
Problem Setter : Jayant Mukherji