Woburn Challenge 2017-18 Round 3 - Junior Division

A new science fiction psychological thriller action-comedy film, The Codefather, is being released this weekend! You'd love to go see it, but you'll first need to convince your friends that it'll be good. Fortunately, trusted movie review websites such as Rotten Tomatoes exist for this purpose!
Following its release in theatres, The Codefather will receive a
series of P
) or negative (if N
).
At any given point in time after its first review, each movie on Rotten Tomatoes is considered to have a certain Tomatometer score. This score is a real number, computed as the number of positive reviews received so far divided by the total number of reviews received so far.
You're concerned that The Codefather's final Tomatometer score may end up not being too high, as general audiences may not grasp its subtle competitive programming-driven writing. However, if you keep refreshing its Rotten Tomatoes page as new reviews come in, maybe you can catch a point in time at which it has a higher score, and take a screenshot of it to show to your friends! Determine the maximum Tomatometer score which The Codefather will reach at any point after its first review.
Your answer must have at most
Input Specification
The first line of input consists of a single integer,
Output Specification
Output a single real number, the maximum Tomatometer score achieved by The Codefather.
Sample Input
7
N
P
N
P
P
N
P
Sample Output
0.6
Sample Explanation
After the first
Comments