n = int(input()) table = [] for i in range(n): table.append(list(input())) for i in range(n): for j in range(n): if table[i][j] == '-': table[i][j] = 'o' table[j][i] = 'x' win = 0 win_e = 0 pos = 1 for i in range(n): if i == 0: win = table[i].count('o') else: win_e = table[i].count('o') if win < win_e: pos += 1 print(pos)