#abc291a. A - camel Case

A - camel Case

Score : 100100 points

## 问题描述

给定一个由大写和小写英文字母组成的字符串 $S$。
其中,$S$ 中恰好有一个字符是大写的,其余均为小写。
找出整数 $x$,使得 $S$ 的第 $x$ 个字符是大写的。
这里,$S$ 的首字符被视为第 $1$ 个字符。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

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

Constraints

  • SS is a string of length between 22 and 100100, inclusive, consisting of uppercase and lowercase English letters.
  • SS has exactly one uppercase letter.

Input

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

SS

Output

Print the integer xx such that the xx-th character of SS is uppercase.

Sample Input 1

aBc

Sample Output 1

2

The 11-st character of aBc is a, the 22-nd is B, and the 33-rd is c; the 22-nd character is uppercase.
Thus, 22 should be printed.

Sample Input 2

xxxxxxXxxx

Sample Output 2

7

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

Sample Input 3

Zz

Sample Output 3

1

update @ 2024/3/10 12:08:04