score1 = int(input())
score2 = int(input())
score3 = int(input())
score4 = int(input())
score5 = int(input())
score6 = int(input())
score7 = int(input())
score8 = int(input())
score9 = int(input())
score10 = int(input())
score11 = int(input())
score12 = int(input())
score13 = int(input())
score14 = int(input())
score15 = int(input())
score16 = int(input())
score17 = int(input())
score18 = int(input())
score19 = int(input())
score20 = int(input())
score21 = int(input())
score22 = int(input())
score23 = int(input())
score24 = int(input())
score25 = int(input())
score26 = int(input())
score27 = int(input())
score28 = int(input())
score29 = int(input())
score30 = int(input())
lst = [score1, score2, score3, score4, score5, score6, score7, score8,
    score9, score10, score11, score12, score13, score14, score15, score16,
    score17, score18, score19, score20, score21, score22, score23, score24,
    score25, score26, score27, score28, score29, score30]
c = 0
totalsc = sum(lst)
for i in lst:
    if i == 3:
        c = c + 1
print(totalsc, c)

e465d9e8e2332cd6e7833de7efc6b3f1f4c855a4
<mask token>

<mask token>
for i in lst:
    if i == 3:
        c = c + 1
print(totalsc, c)

score1 = int(input())
score2 = int(input())
score3 = int(input())
score4 = int(input())
score5 = int(input())
score6 = int(input())
score7 = int(input())
score8 = int(input())
score9 = int(input())
score10 = int(input())
score11 = int(input())
score12 = int(input())
score13 = int(input())
score14 = int(input())
score15 = int(input())
score16 = int(input())
score17 = int(input())
score18 = int(input())
score19 = int(input())
score20 = int(input())
score21 = int(input())
score22 = int(input())
score23 = int(input())
score24 = int(input())
score25 = int(input())
score26 = int(input())
score27 = int(input())
score28 = int(input())
score29 = int(input())
score30 = int(input())
lst = [score1, score2, score3, score4, score5, score6, score7, score8,
    score9, score10, score11, score12, score13, score14, score15, score16,
    score17, score18, score19, score20, score21, score22, score23, score24,
    score25, score26, score27, score28, score29, score30]
c = 0
totalsc = sum(lst)
for i in lst:
    if i == 3:
        c = c + 1
print(totalsc, c)
