#!/usr/bin/python3
import sys
import re

fcnt=0
dcnt=0
siz=0

line = sys.stdin.readline()
while line:
  col = line.split()
  if col[10] == '.':
    pass
  elif not re.match(r'^d',col[2]):
    fcnt += 1
    siz += int(col[6])
  else:
    dcnt += 1
  line = sys.stdin.readline()

print("{} {} {}".format(fcnt,siz,dcnt))
