You are given a string $s$, consisting of only lowercase letters from a to z.
A pair of adjacent characters in the string is considered nice if and only if the two characters are adjacent in alphabet.
For example, ab, dc, xy are nice pairs while ll, ac and oi are not.
Your task is to find the number of nice pairs in $s$.
For example, in the string abcede, ab,bc,ed and de are nice pairs. Therefore the answer for this string is $4$.
Input
The only line consists of a string $s$ of lower case letters. ($1 \le \lvert s \rvert \le 100$)
Output
Output a single integer indicating the number of nice pairs of the string.
Sample Test Cases
| Input | Output | |
|---|---|---|
| abcede | 4 | |
| thiscontestisveryeasyisntit | 3 |
Scoring: Per Subtask
Authored by s22l19
Appeared in 2026 Mini Comp 2