Valera runs a 24/7 fast food cafe. He magically learned that next day n people will visit his cafe. For each person we know the arrival time: the i-th person comes exactly at h_{i} hours m_{i} minutes. The cafe spends less than a minute to serve each client, but if a client comes in and sees that there is no free cash, than he doesn't want to wait and leaves the cafe immediately. 

Valera is very greedy, so he wants to serve all n customers next day (and get more profit). However, for that he needs to ensure that at each moment of time the number of working cashes is no less than the number of clients in the cafe. 

Help Valera count the minimum number of cashes to work at his cafe next day, so that they can serve all visitors.


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 10^5), that is the number of cafe visitors.

Each of the following n lines has two space-separated integers h_{i} and m_{i} (0 ≤ h_{i} ≤ 23; 0 ≤ m_{i} ≤ 59), representing the time when the i-th person comes into the cafe. 

Note that the time is given in the chronological order. All time is given within one 24-hour period.


-----Output-----

Print a single integer — the minimum number of cashes, needed to serve all clients next day.


-----Examples-----
Input
4
8 0
8 10
8 10
8 45

Output
2

Input
3
0 12
10 11
22 22

Output
1



-----Note-----

In the first sample it is not enough one cash to serve all clients, because two visitors will come into cafe in 8:10. Therefore, if there will be one cash in cafe, then one customer will be served by it, and another one will not wait and will go away.

In the second sample all visitors will come in different times, so it will be enough one cash.

Difficulty: interview

Starter code:

Solutions:
from collections import *
import sys
print(Counter(sys.stdin.readlines()).most_common(1)[0][1])


n=int(input())
maxx=1
x=input().split()
A=[x]
ans=1
for i in range(n-1):
    y=input().split()
    if(y==A[-1]):
        ans+=1
    else:
        ans=1
    A.append(y)
    if(ans>maxx):
        maxx=ans

print(maxx)



t = {}
for i in range(int(input())):
    a, b = map(int, input().split())
    c = a * 60 + b
    t[c] = t.get(c, 0) + 1
                   
print(max(t.values()))

3

def readln(): return tuple(map(int, input().split()))

n, = readln()
cnt = {}
for _ in range(n):
    hm = readln()
    cnt[hm] = cnt.get(hm, 0) + 1
print(max(cnt.values()))


n = int(input())
maxx = 1
x = input().split()
A = [x]
res = 1
for i in range(n - 1):
    y = input().split()
    if y == A [-1]:
        res += 1
    else:
        res = 1
    A.append(y)
    if res > maxx:
        maxx = res

print(maxx)

n=int(input())
l=[]
while n:
  m=[int(i) for i in input().split(" ")]
  l.append((m[0],m[1]))
  n-=1
d={}
for i in l:
  d[i]=0
for i in l:
  d[i]+=1
print(max(d.values()))

n = int(input())

time_count_pairs = {}

for i in range(n) :
	time = input()
	if not time_count_pairs.get(time) :
		time_count_pairs[time] = 1
	else :
		time_count_pairs[time] += 1

count_max = 0

for i in list(time_count_pairs.values()) :
	if i > count_max :
		count_max = i

print(count_max)


checkouts = 0
max_checkouts = 0
time = ""

customers = int(input())

for i in range(customers):
    next_time = input()
    if next_time == time:
        checkouts += 1
    else:
        max_checkouts = max(max_checkouts, checkouts)
        checkouts = 0
        time = next_time
    
max_checkouts = max(max_checkouts, checkouts)
print(max_checkouts + 1)

n = int(input())
d = {}
for i in range(n):
    a = tuple(map(int, input().split()))
    d[a] = d.get(a, 0) + 1
print(max(d.values()))

n = int(input())
ans = j = 1
prev = []
for i in range(n):
    new = list(map(int, input().split()))
    if new == prev:
        j += 1
    else:
        ans = max(ans, j)
        j = 1
    prev = new
print(max(ans, j))


from collections import defaultdict
dic = defaultdict(int)

for i in range(int(input())):
    a, b = list(map(int, input().split()))
    dic[60 * a + b] += 1

print(max(dic.values()))



dic = {}

for i in range(int(input())):
    a = input()
    dic[a] = dic.get(a, 0) + 1

print(max(dic.values()))

def input_persons() -> dict:
    n = int(input())
    result = {
        'length': n,
        'hour': [],
        'minute': []
    }

    for _ in range(n):
        (h, m) = map(int, input().split())
        result['hour'].append(h)
        result['minute'].append(m)

    return result


def count_cash(arrivals: dict) -> int:
    min_cash = 0
    i = 0

    while (i < arrivals['length']):
        j = i

        while j < arrivals['length'] - 1 and \
                        arrivals['hour'][j + 1] == arrivals['hour'][j] and \
                        arrivals['minute'][j + 1] == arrivals['minute'][j]:
            j += 1

        cash = j - i + 1

        if cash > min_cash:
            min_cash = cash

        i = j + 1

    return min_cash

print(count_cash(input_persons()))

n = int(input())
arrivals_count = {}

for _ in range(n):
    arrival = input()
    arrivals_count[arrival] = arrivals_count.get(arrival, 0) + 1

print(max(arrivals_count.values()))

n = int(input())

r = 1

last = ''
for i in range(n):
    inp = input()
    if inp == last:
        x += 1
    else:
        x = 1
    r = max(r, x)
    last = inp

print(r)


from collections import Counter
a=int(input())
sa=[]
string=''
bad=[]
for x in range(a):
    string=''
    sa=input().split(' ')
    string+=sa[0]
    string+='+'
    string+=sa[1]
    bad.append(string)
a=Counter(bad).most_common(1)
print(a[0][1])


n = int(input())

cash = {}

for i in range(n):
	key = input()
	if(key in cash):
		cash[key] += 1
	else:
		cash[key] = 1

maxm = 0

for key in cash:
	if (cash[key] > maxm):
		maxm = cash[key]

print(maxm)




import sys

n = int (eval(input ()))

c = 1
a = [0]*60*24

for i in range (n):
    nums = list (map (int, input ().split ()))
    a[nums[0]*60 + nums[1]] += 1

for i in range (60*24):
    c = max (c, a[i])

print (c)


val = 0
c = 0
prev = ''
for i in range(int(input())):
    cur = input()
    if cur == prev:
        c += 1
    else:
        c = 1
    if c > val:
        val = c
    prev = cur
print(val)

dict = {}
for x in range(int(input())):
    s = input()
    if not s in dict.keys():
        dict[s] = 1
    else:
        dict[s] += 1
        
print(max(dict.values()))

import sys

n = int(sys.stdin.readline())

first_p = (sys.stdin.readline()).split()
count = 1
vmax = 0

for i in range(n - 1):
    second_p = (sys.stdin.readline()).split()
    if(first_p[0] == second_p[0] and first_p[1] == second_p[1]):
        count += 1
    else:
        if(count > vmax):
            vmax = count
        count = 1
        
    first_p = second_p;   

if(count > vmax):
    vmax = count    

print(vmax)
    


n=int(input())
max=1

a,b=input().split(" ")
counter=1
for i in range(n-1):
    c,d=input().split(" ")
    if (a==c and b==d):
        counter+=1
        if counter>max:max=counter
    else:
        a=c
        b=d
        counter=1

print (max)


n=int(input())
max=1

a=input()
counter=1
for i in range(n-1):
    c=input()
    if (a==c):
        counter+=1
        if counter>max:max=counter
    else:
        a=c
        counter=1

print (max)


c = int(input())
s = {}
for i in range(c):
    newI = input()
    if newI not in s:
        s[newI] = 1
    else:
        s[newI] += 1
print(max(s.values()))

n = int(input())
ans = 0
last = ''
cur = 0
for i in range(n):
	s = input()
	if s != last:
		last = s
		cur = 0
	cur += 1
	ans = max(ans, cur)
print(max(ans, cur))