AT_abc418_b [ABC418B] You're a teapot

Description

> I begin with T and end with T, and I am full of T. What am I? For a string $ t $ , define the **filling rate** as follows: - If the first and last characters of $ t $ are both `t` and $ |t| \geq 3 $ : Let $ x $ be the number of `t` in $ t $ . Then the filling rate of $ t $ is $ \displaystyle\frac{x-2}{|t|-2} $ , where $ |t| $ denotes the length of $ t $ . - Otherwise: the filling rate of $ t $ is $ 0 $ . You are given a string $ S $ . Find the maximum possible filling rate of a substring of $ S $ . What is a substring?A **substring** of $ S $ is a string obtained by removing zero or more characters from the beginning and the end of $ S $ . For example, `ab`, `bc`, and `bcd` are substrings of `abcd`, while `ac`, `dc`, and `e` are not substrings of `abcd`.

Input Format

The input is given from Standard Input in the following format: > $ S $

Output Format

Print the maximum possible filling rate of a substring of $ S $ . Your output will be judged as correct when the absolute error from the true value is at most $ 10^{-9} $ .

Explanation/Hint

### Sample Explanation 1 `ttit` is a substring of $ S $ , and its filling rate is $ \displaystyle\frac{3-2}{4-2} = \frac{1}{2} $ . There is no substring with a filling rate greater than $ \frac{1}{2} $ , so the answer is $ \frac{1}{2} $ . ### Sample Explanation 2 `ttottott` is a substring of $ S $ , and its filling rate is $ \displaystyle\frac{6-2}{8-2} = \frac{2}{3} $ . There is no substring with a filling rate greater than $ \frac{2}{3} $ , so the answer is $ \frac{2}{3} $ . ### Sample Explanation 3 `ff` is a substring of $ S $ , and its filling rate is $ 0 $ . There is no substring with a filling rate greater than $ 0 $ , so the answer is $ 0 $ . ### Constraints - $ 1 \leq |S| \leq 100 $ - $ S $ is a string consisting of lowercase English letters.