with open("times", "rb") as fd:
    lines = fd.read().decode("utf-8").strip().split("\n")
times = []
for line in lines:
    times.append(line.split(" ")[-1])
import re
total = 0
for t in times:
    msm = re.search("(\d+)m:(\d+)\.(\d+)s", t).groups()
    if len(msm) != 3:
        print(t)
    total += int(msm[0]) * 60 * 1000
    total += int(msm[1]) * 1000
    total += int(msm[2])
hours = total // 1000 // 3600
total -= hours * 3600 * 1000
minutes = total // 1000 // 60
total -= minutes * 60 * 1000
seconds = total // 1000
total -= seconds * 1000
print(hours, minutes, seconds, total)
