n = int(input()) cnt = [input().count("^") for i in range(n)] dic = {} for i in cnt: if i in dic: dic[i] += 1 else: dic[i] = 1 ans = 0 mode = 0 for key in sorted(list(dic.keys())): if dic[key] >= mode: ans = key mode = dic[key] print(ans)