cswork / OAOpen practice workspace

ZipRecruiterOA #5

Count Triple

Estimated EasyJudge-ready

Topics (AI-labelled)StringsHashing

Given a sentence containing only English letters and spaces, count the words in which at least one letter (ignoring case) appears three or more times. Each word counts only once.

Input

One line of 1..100000 ASCII characters, containing only English words and spaces, with no leading or trailing spaces and no punctuation.

Output

Output the number of qualifying words.

Example 1

Input:

Dooddle moodle Pepper unsuccessfully

Output:

3

Example 2

Input:

aA AaA abc

Output:

1

Example 3

Input:

Bookkeeper tree

Output:

1

Editorial

Loading solution…