def is_word(s): alph = 'АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя' for c in s: if not c.isalpha() and c not in alph: return False return True text = input().split() answ = 0 for e in text: answ += is_word(e) print(answ)