1029: Rightmost

Memory Limit:1024 MB Time Limit:2.000 S
Judge Style:Text Compare Creator:
Submit:11 Solved:4

Description

You are given a string lns="http://www.w3.org/1998/Math/MathML"> consisting of lowercase English letters.
If a appears in lns="http://www.w3.org/1998/Math/MathML">, print the last index at which it appears; otherwise, print lns="http://www.w3.org/1998/Math/MathML">1. (The index starts at lns="http://www.w3.org/1998/Math/MathML">1.)

Input

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

S

S a string of length between 1 and 100 (inclusive) consisting of lowercase English letters.


Output

Print the answer.

Sample Input Copy

abcdaxayz

Sample Output Copy

7