A - camel Case Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100

問題文

英大文字および英小文字からなる文字列 S が与えられます。
ここで、 S のうちちょうど 1 文字だけが英大文字であり、それ以外は全て英小文字です。
大文字が S の先頭から何文字目に登場するか出力してください。
ただし、S の先頭の文字を 1 文字目とします。

制約

  • S は英大文字および英小文字からなる長さ 2 以上 100 以下の文字列
  • S に大文字はちょうど 1 つ含まれる。

入力

入力は以下の形式で標準入力から与えられる。

S

出力

大文字が S の先頭から何文字目に登場するかを、整数で出力せよ。


入力例 1

aBc

出力例 1

2

aBc の先頭から 1 文字目は a , 2 文字目は B , 3 文字目は c であり、 このうち大文字は 2 文字目です。
よって、2 を出力します。


入力例 2

xxxxxxXxxx

出力例 2

7

S=xxxxxxXxxx7 文字目に、大文字である X が登場しています。よって、7 を出力します。


入力例 3

Zz

出力例 3

1

Score : 100 points

Problem Statement

You are given a string S consisting of uppercase and lowercase English letters.
Here, exactly one character of S is uppercase, and the others are all lowercase.
Find the integer x such that the x-th character of S is uppercase.
Here, the initial character of S is considered the 1-st one.

Constraints

  • S is a string of length between 2 and 100, inclusive, consisting of uppercase and lowercase English letters.
  • S has exactly one uppercase letter.

Input

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

S

Output

Print the integer x such that the x-th character of S is uppercase.


Sample Input 1

aBc

Sample Output 1

2

The 1-st character of aBc is a, the 2-nd is B, and the 3-rd is c; the 2-nd character is uppercase.
Thus, 2 should be printed.


Sample Input 2

xxxxxxXxxx

Sample Output 2

7

An uppercase letter X occurs as the 7-th character of S=xxxxxxXxxx, so 7 should be printed.


Sample Input 3

Zz

Sample Output 3

1