小亮最近听说月球上有兔兔族,于是决定调查一番。兔兔族们会在月球上种胡萝卜,并制作成胡萝卜沙拉。每份胡萝卜沙拉需要带来好运的幸运胡萝卜1根,增强体力的强壮胡萝卜2根,令人愉悦的开心胡萝卜4根。兔兔们对胡萝卜沙拉有着强烈的执着,沙拉中的各种胡萝卜数量必须严格符合要求。
现在仓库内有幸运胡萝卜 a 根,强壮胡萝卜 b 根,开心胡萝卜 c 根。请问在制作尽可能多的胡萝卜沙拉的情况下,将会消耗多少根胡萝卜?
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.
第一行包含一个正整数 a (1≤a≤1000) ,表示幸运胡萝卜的数量。
第二行包含一个正整数 b (1≤b≤1000) ,表示
强壮胡萝卜的数量。
第三行包含一个正整数 c (1≤c≤1000) ,表示开心胡萝卜的数量。
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.
输出消耗的胡萝卜总数。
Print the maximum total number of lemons, apples and pears from which Nikolay can cook the compote.
样例2输入
4
7
13
样例2输出
21
样例3输入
2
3
2
样例3输出
0
在第一组样例中,可以消耗1根幸运胡萝卜+2根强壮胡萝卜+4根开心胡萝卜,制作1份胡萝卜沙拉。
在第二组样例中,可以消耗3根幸运胡萝卜+6根强壮胡萝卜+12根开心胡萝卜,制作3份胡萝卜沙拉。
在第三组样例中,无法制作胡萝卜沙拉。
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.