s = input()
total = len(s)
for i in range(len(s)):
	if s[i]=='w':
		total += 2
	else:
		total += 1
print(total)