cswork / OAOpen practice workspace

VisaOA #1

Letter Case Difference

EasyJudge-ready

Topics (AI-labelled)Strings

Count the number of uppercase English letters in typedText minus the number of lowercase English letters.

Input

A non-empty string containing only English letters A-Z and a-z; length 1..200000 (site-added).

Output

Output the uppercase count minus the lowercase count.

Example 1

Input:

AbCd

Output:

0

Example 2

Input:

Aaa

Output:

-1

Example 3

Input:

xyzXYZ

Output:

0

Editorial

Loading solution…