#ABC276A. [ABC276A] Rightmost

[ABC276A] Rightmost

Score : 100100 points

Problem Statement

You are given a string SS consisting of lowercase English letters. If a appears in SS, print the last index at which it appears; otherwise, print 1-1. (The index starts at 11.)

Constraints

  • SS is a string of length between 11 and 100100 (inclusive) consisting of lowercase English letters.

Input

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

SS

Output

Print the answer.

abcdaxayz
7

a appears three times in SS. The last occurrence is at index 77, so you should print 77.

bcbbbz
-1

a does not appear in SS, so you should print 1-1.

aaaaa
5