s = "#" + input() n = (len(s) - 2) // 5 L = 0 R = 0 for i in range(n): if s[i * 5 + 2] == "*": R += 1 else: L += 1 print(L, R)