#CCBCHMOT0000034. Hai chữ số kề nhau bằng nhau (Equal Adjacent Decimal Digits)

Hai chữ số kề nhau bằng nhau (Equal Adjacent Decimal Digits)

Equal Adjacent Decimal Digits

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem Statement

Given nonnegative integer n in standard decimal notation without leading zeros, count neighboring equal digit pairs. Overlapping pairs are counted, so 111 contains two pairs.

Input

One nonnegative integer n.

Output

Print the number of equal adjacent digit pairs.

Subtasks

  • Subtask 1 (20%): 0≤n≤9990\le n\le999.
  • Subtask 2 (30%): 0≤n≤1090\le n\le10^9.
  • Subtask 3 (50%): 0≤n≤10180\le n\le10^{18}.

Examples

Example 1

Input

12233

Output

2

Explanation

The pairs 2-2 and 3-3 match, hence answer 2.

Example 2

Input

111

Output

2

Explanation

Positions (1,2) and (2,3) both match.