def solve(z):
	p,count = z.upper(),0
	for b in set(p):
		if p.count(b) > 1:
			count+= 1
	return count
	
s = 'aabBcde'
print(solve(s))