题目描述
As the league stage of the world cup has come to its end, its time to calculate the highest points earned in the league stage by a team.
There are many teams playing in the world cup. A team is awarded 3 points for a win, 1 point for a tie and it loses 1 point if they lose a match. You have received data of N teams and have been assigned the duty to calculate the highest point earned by a team among the N teams in the league stage. For each team, data contains three integers – W ( number of wins), T (number of tie), L (number of matches the team lost). Now, calculate the highest points earned by a team in the league stage among the N teams.
INPUT:
First line contains a integer N, number of teams.
Next N lines contains three integers separated by space : W T L , number of wins, tie, lost matches for that ith team. (1 ≤ i ≤ N)
OUTPUT:
print a single integer , highest points earned a team among the N teams.
CONSTRAINS
1 ≤ N ≤ 1000
0 ≤ W,T,L ≤ 100
Disclaimer : All the data are fictional and has no relation and significance with real life.
SAMPLE INPUT
3
3 0 1
2 1 3
1 1 1
SAMPLE OUTPUT
8
Explanation
Team 1 = (3x3) + (0x1) + (1x-1) = 8
Team 2 = (2x3) + (1x1) + (3x-1) = 4
Team 3 = (1x3) + (1x1) + (1x-1) = 3
So the highest point earned by any team is 8.
输入格式
见题面
输出格式
见题面