{"raw_statement":[{"iden":"problem statement","content":"For a positive integer $L$, a level-$L$ dango string is a string that satisfies the following conditions.\n\n*   It is a string of length $L+1$ consisting of `o` and `-`.\n*   Exactly one of the first character and the last character is `-`, and the other $L$ characters are `o`.\n\nFor instance, `ooo-` is a level-$3$ dango string, but none of `-ooo-`, `oo`, and `o-oo-` is a dango string (more precisely, none of them is a level-$L$ dango string for any positive integer $L$).\nYou are given a string $S$ of length $N$ consisting of the two characters `o` and `-`. Find the greatest positive integer $X$ that satisfies the following condition.\n\n*   There is a contiguous substring of $S$ that is a level-$X$ dango string.\n\nIf there is no such integer, print `-1`."},{"iden":"constraints","content":"*   $1\\leq N\\leq 2\\times10^5$\n*   $S$ is a string of length $N$ consisting of `o` and `-`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"10\no-oooo---o"},{"iden":"sample output 1","content":"4\n\nFor instance, the substring `oooo-` corresponding to the $3$\\-rd through $7$\\-th characters of $S$ is a level-$4$ dango string. No substring of $S$ is a level-$5$ dango string or above, so you should print $4$."},{"iden":"sample input 2","content":"1\n-"},{"iden":"sample output 2","content":"\\-1\n\nOnly the empty string and `-` are the substrings of $S$. They are not dango strings, so you should print `-1`."},{"iden":"sample input 3","content":"30\n-o-o-oooo-oo-o-ooooooo--oooo-o"},{"iden":"sample output 3","content":"7"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}