Mimi is playing with a string when her little sister asks her a question:
How many substrings of are there such that these substrings are of length and have exactly 1 distinct letter?
Let denote the length of .
For all subtasks:
Subtask 1 [10%]
Subtask 2 [90%]
The first line of input will contain a single string, , consisting of only lowercase English letters.
The second line of input will contain an integer, .
The number of substrings which satisfy the given condition.