#30367: __答案


tc1090660@tcjhs.tyc.edu.tw (82112張瑋宸)


bonus = 0
for _ in range(5):
    a,b,c=sorted(map(int,input().split()))
    if a + b> c:
        bonus += 1
print(bonus)