Nikolay has *a* lemons, *b* apples and *c* pears. He decided to cook a compote. According to the recipe the fruits should be in the ratio 1: 2: 4. It means that for each lemon in the compote should be exactly 2 apples and exactly 4 pears. You can't crumble up, break up or cut these fruits into pieces. These fruits — lemons, apples and pears — should be put in the compote as whole fruits.

Your task is to determine the maximum total number of lemons, apples and pears from which Nikolay can cook the compote. It is possible that Nikolay can't use any fruits, in this case print 0.
The first line contains the positive integer *a* (1 ≤ *a* ≤ 1000) — the number of lemons Nikolay has. 

The second line contains the positive integer *b* (1 ≤ *b* ≤ 1000) — the number of apples Nikolay has. 

The third line contains the positive integer *c* (1 ≤ *c* ≤ 1000) — the number of pears Nikolay has.
In the first example Nikolay can use 1 lemon, 2 apples and 4 pears, so the answer is 1 + 2 + 4 = 7.

In the second example Nikolay can use 3 lemons, 6 apples and 12 pears, so the answer is 3 + 6 + 12 = 21.

In the third example Nikolay don't have enough pears to cook any compote, so the answer is 0.
2
5
7
7
4
7
13
21
2
3
2
0
1
1
1
0
1
2
4
7
1000
1000
1000
1750
1
1
4
0
1
2
3
0
1
1000
1000
7
1000
1
1000
0
1000
2
1000
7
1000
500
1000
1750
1000
1000
4
7
1000
1000
3
0
4
8
12
21
10
20
40
70
100
200
399
693
200
400
800
1400
199
400
800
1393
201
400
800
1400
200
399
800
1393
200
401
800
1400
200
400
799
1393
200
400
801
1400
139
252
871
882
109
346
811
763
237
487
517
903
161
331
725
1127
39
471
665
273
9
270
879
63
137
422
812
959
15
313
525
105
189
407
966
1323
18
268
538
126
146
421
978
1022
70
311
685
490
244
405
625
1092
168
454
832
1176
46
344
772
322
174
438
987
1218
144
387
693
1008
22
481
633
154
196
280
848
980
190
454
699
1218
231
464
928
1617
151
308
616
1057
88
182
364
616
12
26
52
84
204
412
824
1428
127
256
512
889
224
446
896
1561
146
291
584
1015
83
164
332
574
20
38
80
133
198
393
792
1372
120
239
480
833
208
416
831
1449
130
260
517
903
67
134
267
462
245
490
979
1708
182
364
727
1267
104
208
413
721
10
2
100
7
2
100
100
14
2
3
8
7
1
2
8
7
1
2
200
7
5
4
16
14
1
10
10
7
1
4
8
7
100
4
1000
14
2
6
12
14
10
7
4
7
2
10
100
14
2
3
4
7
1
2
999
7
1
10
20
7
100
18
20
35
100
1
100
0
3
7
80
21
2
8
24
14
1
100
100
7
2
1
8
0
10
5
23
14
a=int(input())
b=int(input())
c=int(input())
x=[a,b,c]
t=a
j=0
while j<len(x):
    y=[t,t*2,t*4]
    for j in range(len(x)):
        if x[j]<y[j]:
            t-=1
            j=-1
            break
    j+=1    
if y[0]==0:
    print(0)
else:        
    print(sum(y))