cswork / OAOpen practice workspace

UberOA #3

Caps Lock Key Changes

Estimated EasyJudge-ready

Topics (AI-labelled)Strings

Ignoring case, count how many times the letter changes between adjacent typed characters.

This site's standard input/output is stated explicitly.

Input

One line containing a string of English letters, of length 1..1000 (this site inputs the character sequence as a contiguous string of ASCII English letters).

Output

Output one integer answer.

Example 1

Input:

WwaAbb

Output:

2

Example 2

Input:

wWaWa

Output:

3

Example 3

Input:

aAAa

Output:

0

Example notes

Example 1: w changes to a, and a changes to b, 2 times in total. Example 2: among w, w, a, w, a there are 3 changes. Example 3: every letter is a, so there are 0 changes.

Editorial

Loading solution…