IntermediateSimulation2000 ms256 MB

Attendance Streak

A string contains `P` for present and `A` for absent across several sessions. Find the longest consecutive run of `P`.

Statement

A string contains `P` for present and `A` for absent across several sessions. Find the longest consecutive run of `P`.

Input

One string containing only `P` and `A`.

Output

Print the length of the longest present streak.

Constraints

  • String length is at most 100000.

Examples

Example 1

Input

PPAPPPPAP

Output

4

The longest run of present sessions is PPPP.

Sample runs use visible examples. Full submissions are checked securely on the server, and private test cases are not shown in the browser.