#C5677. Maximum Consecutive Open Days
Maximum Consecutive Open Days
Maximum Consecutive Open Days
Given a string S consisting of exactly 3 characters where each character is either 'O' (representing an open day) or 'C' (representing a closed day), your task is to compute the maximum number of consecutive open days.
In other words, you need to find the longest contiguous sequence of 'O' in the string S. Mathematically, if we denote a sequence of consecutive 'O's as \(\ell\), the result is \(\max(\ell)\) over all such sequences.
inputFormat
The input consists of a single string S of length 3 containing only the characters 'O' and 'C'. The string is provided via standard input.
outputFormat
Output a single integer representing the maximum number of consecutive 'O' characters in the string S on standard output.
## sampleCOO
2