Problem: 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.

Solution (in PYTHON):

Solution:
def score_team(w,t,l):
	w=int(w)
	t=int(t)
	l=int(l)
	return (3*w)+(t)-(l)

l=[]
t=float(raw_input())
for i in range (0,int(t)):
    temp=[]
    b_temp='0'
    a=raw_input()
    for j in range (0,len(a)):
        if (a[j]!=' '):
            b_temp=b_temp+a[j]
        if (a[j]==' ' or j==len(a)-1):
            temp.append(b_temp)
            b_temp='0'
    l.append (score_team(temp[0],temp[1],temp[2]))
print (max(l))