Sami's spaceship crashed on Mars! She sends sequential SOS messages to Earth for help.
Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string, , determine how many letters of Sami's SOS have been changed by radiation.
Input Format
There is one line of input: a single string, .
Note: As the original message is just SOS repeated times, 's length will be a multiple of .
Constraints
will contain only uppercase English letters.
Output Format
Print the number of letters in Sami's message that were altered by cosmic radiation.
Explanation Sample 0
S
= SOSSPSSQSSOR, and signal length |S|=12
. Sami sent 4 SOS messages (i.e.: 12/4=3
).
Expected signal: SOSSOSSOSSOS Recieved signal: SOSSPSSQSSOR We print the number of changed letters, which is 3.
Sample 1
S= SOSSOT, and signal length |S|=6
. Sami sent 2 SOS messages (i.e.: 6/3=2
).
Expected Signal: SOSSOS Received Signal: SOSSOT We print the number of changed letters, which is 1.