#!/usr/bin/python

import sys, re

# Uncomment for part 2

total = 0
for word in sys.stdin.readlines():
	word = word.rstrip("\n")
	#word = '"' + re.sub(r'(\W)', r'\\\1', word) + '"' 
	total += len(word) - len(eval(word))

print(total)