inp = input().split(' ')
max_ans = []
for i in range(len(inp)):
    inp[i] = inp[i][:-1]
for i in range(len(inp)):
    max_ans.append(inp.count(inp[i]))
print(max(max_ans))

769ad87c9caad819094d3f980338b960c22601ac
<mask token>

<mask token>
for i in range(len(inp)):
    inp[i] = inp[i][:-1]
for i in range(len(inp)):
    max_ans.append(inp.count(inp[i]))
print(max(max_ans))

inp = input().split(' ')
max_ans = []
for i in range(len(inp)):
    inp[i] = inp[i][:-1]
for i in range(len(inp)):
    max_ans.append(inp.count(inp[i]))
print(max(max_ans))
