#60. countTriple

countTriple

Background

Description

We'll say that a "triple" in a string is a char appearing three times in a row. Return the number of triples in the given string. The triples may overlap.

Format

Input

Output

Samples

abcXXXabc
1
xxxabyyyycd
3
a
0

Limitation

1s, 1024KiB for each test case.