Pasha decided to invite his friends to a tea party. For that occasion, he has a large teapot with the capacity of w milliliters and 2n tea cups, each cup is for one of Pasha's friends. The i-th cup can hold at most a_{i} milliliters of water.

It turned out that among Pasha's friends there are exactly n boys and exactly n girls and all of them are going to come to the tea party. To please everyone, Pasha decided to pour the water for the tea as follows:  Pasha can boil the teapot exactly once by pouring there at most w milliliters of water;  Pasha pours the same amount of water to each girl;  Pasha pours the same amount of water to each boy;  if each girl gets x milliliters of water, then each boy gets 2x milliliters of water. 

In the other words, each boy should get two times more water than each girl does.

Pasha is very kind and polite, so he wants to maximize the total amount of the water that he pours to his friends. Your task is to help him and determine the optimum distribution of cups between Pasha's friends.


-----Input-----

The first line of the input contains two integers, n and w (1 ≤ n ≤ 10^5, 1 ≤ w ≤ 10^9) — the number of Pasha's friends that are boys (equal to the number of Pasha's friends that are girls) and the capacity of Pasha's teapot in milliliters.

The second line of the input contains the sequence of integers a_{i} (1 ≤ a_{i} ≤ 10^9, 1 ≤ i ≤ 2n) — the capacities of Pasha's tea cups in milliliters.


-----Output-----

Print a single real number — the maximum total amount of water in milliliters that Pasha can pour to his friends without violating the given conditions. Your answer will be considered correct if its absolute or relative error doesn't exceed 10^{ - 6}.


-----Examples-----
Input
2 4
1 1 1 1

Output
3
Input
3 18
4 4 4 2 2 2

Output
18
Input
1 5
2 3

Output
4.5


-----Note-----

Pasha also has candies that he is going to give to girls but that is another task...

Difficulty: interview

Starter code:

Solutions:
n, w = list(map(int, input().split()))
a = sorted(map(int, input().split()))

x = min(min(a[:n]), min(a[n:]) / 2)
print(min(w, 3 * n * x))


n, w = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
a.sort()
t = min(a[0]*2, a[len(a) // 2])
print(min(w, (t * len(a) // 2) + (t/2)*(len(a) // 2)))


n,w=map(int,input().split(" "))
mas=list(map(int,input().split(" ")))
mas.sort()
x1=w/n/3
x2=mas[0]
x3=mas[n]/2
print(3*n*min(x1,x2,x3))

n, w = map(int, input().split())
cups = sorted([int(x) for x in input().split()])

girl = cups[0]
boys = cups[n]

both = min(girl, boys/2)

print(min(n*both + 2*n*both, w))

n,w=[int(x) for x in input().split()]
caps=[int(x) for x in input().split()]
caps.sort()
g=caps[0]
b=caps[n]
if(b<2*g):
    g=b/2
print(min(g*3*n,w))


#n = int(input())
n,w = [int(c) for c in input().split()]
a = [int(c) for c in input().split()]
a.sort()

maxgirl = w / (3 * n)

for i in range(n):
    if a[i] < maxgirl:
        maxgirl = a[i]
for i in range(n, 2*n):
    if a[i] < 2 * maxgirl:
        maxgirl = a[i]/2

print(maxgirl*3*n)


def main():
    n, w = list(map(int, input().split()))
    a = sorted(map(int, input().split()))
    print(min(w, min(a[0], a[n] * 0.5) * 3 * n))


def __starting_point():
    main()

__starting_point()

n, w = list(map(int, input().split(' ')))
cups = list(map(int, input().split(' ')))
cups.sort()

max_girl = cups[0]
max_boy = cups[n]
x = min(max_girl, max_boy/2.0, w/(3.0*n))

print(3*x*n)



n, w = map(int, input().split())
capac = list(sorted(map(int, input().split())))
boy = capac[len(capac)//2]
girl = capac[0]

print(min(3*girl*n, 3/2*boy*n, w))



n, w = list(map(int, input().split()))

cups = sorted(list(map(int, input().split())))

girl_cap = min(cups[0], cups[n]/2)




print(min(girl_cap*3*n, w))



import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy
from itertools import chain, dropwhile, permutations, combinations
from collections import defaultdict, deque

# Guide:
#   1. construct complex data types while reading (e.g. graph adj list)
#   2. avoid any non-necessary time/memory usage
#   3. avoid templates and write more from scratch
#   4. switch to "flat" implementations

def VI(): return list(map(int,input().split()))
def I(): return int(input())
def LIST(n,m=None): return [0]*n if m is None else [[0]*m for i in range(n)]
def ELIST(n): return [[] for i in range(n)]
def MI(n=None,m=None): # input matrix of integers
    if n is None: n,m = VI()
    arr = LIST(n)
    for i in range(n): arr[i] = VI()
    return arr
def MS(n=None,m=None): # input matrix of strings
    if n is None: n,m = VI()
    arr = LIST(n)
    for i in range(n): arr[i] = input()
    return arr
def MIT(n=None,m=None): # input transposed matrix/array of integers
    if n is None: n,m = VI()
    a = MI(n,m)
    arr = LIST(m,n)
    for i,l in enumerate(a):
        for j,x in enumerate(l):
            arr[j][i] = x
    return arr


def run(n,x,l,r):
    s = 0
    curr = 1
    for i in range(n):
        skip = (l[i]-curr) // x
        s += r[i]-curr-skip*x+1
        curr = r[i]+1
    print(s)


def main(info=0):
    n,w = VI()
    a = sorted(VI())

    x = min( min(a[:n]), min(a[n:])/2)

    print(min(w, x*n + x*n*2))


def __starting_point():
    main()

__starting_point()

n, w = list(map(int, input().split()))
arr = list(map(int, input().split()))
arr.sort()
a = arr[0]
b = arr[n]
if a * 2 > b:
    a = b / 2
else:
    b = 2 * a
print(min(w, a * n + b * n))


n, w = map(int, input().split())
a = sorted(map(int, input().split()))
print(3 * n * min(w / 3 / n, a[0], a[n] / 2))

__author__ = 'Данила'

n, w = map(int, input().split())

a = list(map(int, input().split()))
s = sum(a)
a.sort()

ans = min(3*n*a[0], 3*n*a[n]/2, w)

print(ans)

n, w = (int(i) for i in input().split())
tea = sorted(int(i) for i in input().split())
smallest = min(tea[0], tea[n]/2)
print(min(smallest*3*n, w))


def read_data():
    n, w = map(int, input().split())
    As = list(map(int, input().split()))
    return n, w, As

def solve(n, w, As):
    As.sort()
    cap_girls = As[0]
    cap_boys = As[n]
    if cap_girls * 2 < cap_boys:
        return min(cap_girls * 3 * n, w)
    else:
        return min(cap_boys * 1.5 * n, w)

n, w, As = read_data()
print(solve(n, w, As))

n, w = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
c = (w/3)/n
a.sort()
if a[0] > c and a[n] > 2*c:
    print(w)
else:
     print(min(a[n]/2, a[0])*3*n)
    


n, w = map(int, input().split())
n *= 2
arr = list(map(int, input().split()))
arr.sort()
g = arr[:n // 2]
b = arr[n // 2:]
first_g = g[0]
first_b = b[0]
if first_g * 2 > first_b:
    first_g = first_b / 2
elif first_g * 2 < first_b:
    first_b = first_g * 2
ans = first_g * n / 2 + first_b * n / 2
print(min(ans, w))

n,w=map(int,input().split())
a=[int(x) for x in input().split()]
a.sort()
print(min(a[0],a[n]/2,w/(3*n))*3*n)

n, w = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
b = a[n]
g = a[0]
if b >= 2*g:
    ret = g*2*n + g*n
elif b >= g:
    ret = b*n+float(b)/2*n
print(min(ret, w))



n,w=list(map(int,input().split()))
ls = list(map(int,input().split()))
ls.sort()
mi = min(ls[0],ls[n]/2)
print(min(w,(3*mi*n)))


#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2015 missingdays <missingdays@missingdays>
#
# Distributed under terms of the MIT license.

"""

"""

inp = input().split()
n = int(inp[0])
w = int(inp[1])

cups = sorted(list(map(int, input().split())))

girl = cups[0]
boy = cups[n]

s = 0

s += (min(girl, boy / 2) * 3 * n)

print(min(s, w))    


n, w = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
v1 = a[0]
v2 = a[n]
q = min(v1, v2 / 2)
print(min(w, q * n * 3))



__author__ = 'Andrey'
n, w = map(int, input().split())
volumes = list(map(int, input().split()))
volumes.sort()
m = -1
if volumes[0] * 2 <= volumes[n]:
    possible = 3 * n * volumes[0]
    if possible <= w:
        m = max(m, possible)
if volumes[n] / 2 <= volumes[0]:
    possible = volumes[n] / 2 * 3 * n
    if possible <= w:
        m = max(m, possible)
if w / (3 * n) <= volumes[0] and 2 * w / (3 * n) <= volumes[n]:
    m = max(m, w)
print(m)

#!/usr/bin/env python3

N, W = tuple(map(int, input().split(' ')))
A = list(map(int, input().split(' ')))

A.sort()

smallest_girl = A[0]
smallest_boy = A[N]

smallest_girl = min(smallest_girl, smallest_boy / 2)
smallest_boy = min(smallest_boy, smallest_girl * 2)

max_pour = (smallest_boy + smallest_girl) * N

print(min(W, max_pour))