Problem: A substring is a string of characters that is contained in another string. For example, the substrings of "abcdef" could be "abc", "bc", "cdef", "e" and so on. But, "bca", "ace", and "g" are not substrings of "abcdef". 

Your task is to count the number of non-empty substrings possible of a given string such that all characters in that substring are same. If two substrings contains same alphabets but appear at different positions in that given string, they are still considered to be different. 

Input

A single string without spaces

Output

a single integer denoting the number of substrings as described above

Constraints
length of string will be between 1 and 100
all characters of string will be small case alphabets only

SAMPLE INPUT
xxxyx

SAMPLE OUTPUT
8

Explanation

four occurrences of substring "x"

one occurrence of substring "y"

two occurrences of substring "xx"  

one occurrence of substring "xxx"

= total 8

Solution (in PYTHON):

Solution:
def solve(input_str):
	# to handle end of string
	SENTINEL = '*'
	input_str += SENTINEL
	
	n_possible_sbstrs = 0
	n_consec_syms = 1
	
	for i in range(len(input_str)):
		if input_str[i] == SENTINEL:
			break
		elif input_str[i] == input_str[i+1]:
			n_consec_syms += 1
		else:
			n_possible_sbstrs += (n_consec_syms * (n_consec_syms + 1)) / 2
			n_consec_syms = 1
			
	return n_possible_sbstrs


if __name__ == '__main__':
	input_str = raw_input()
	print solve(input_str)