

class Item:

	def __init__(self,v,w):

		self.v=v

		self.w=w

		self.r=v/w

	def __str__(self):

		s='v='+str(self.v)

		s+=',w='+str(self.w)

		s+=',r='+str(self.r)

		return s



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

items=[]

for i in range(n):

	vi,wi=list(map(int,input().split()))

	items.append(Item(vi,wi))

	

items.sort(key=lambda x:x.r,reverse=True)



total=0

remain = w

for i in range(n):

	v = items[i].v

	w = items[i].w

	r = items[i].r

	if w <= remain:

		total += v

		remain -= w

	else:

		total += r * remain

		break

			

print(total)





class Item:

	def __init__(self,v,w):

		self.v=v

		self.w=w

		self.r=v/w



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

items=[]

for i in range(n):

	vi,wi=list(map(int,input().split()))

	items.append(Item(vi,wi))

	

items.sort(key=lambda x:x.r,reverse=True)



total=0

remain = w

for i in range(n):

	vi = items[i].v

	wi = items[i].w

	ri = items[i].r

	if wi <= remain:

		total += vi

		remain -= wi

	else:

		total += ri * remain

		break

			

print(total)



class Item:
    def __init__(self, v, w):
        self.v = v
        self.w = w
        self.r = v / w

    def __str__(self):
        s = "v=" + str(self.v)
        s += ",w=" + str(self.w)
        s += ",r=" + str(self.r)
        return s


n, w = list(map(int, input().split()))
items = []
for i in range(n):
    vi, wi = list(map(int, input().split()))
    items.append(Item(vi, wi))
items.sort(key=lambda x: x.r, reverse=True)
total = 0
remain = w
for i in range(n):
    v = items[i].v
    w = items[i].w
    r = items[i].r
    if w <= remain:
        total += v
        remain -= w
    else:
        total += r * remain
        break
print(total)

class Item:
    def __init__(self, v, w):
        self.v = v
        self.w = w
        self.r = v / w


n, w = list(map(int, input().split()))
items = []
for i in range(n):
    vi, wi = list(map(int, input().split()))
    items.append(Item(vi, wi))
items.sort(key=lambda x: x.r, reverse=True)
total = 0
remain = w
for i in range(n):
    vi = items[i].v
    wi = items[i].w
    ri = items[i].r
    if wi <= remain:
        total += vi
        remain -= wi
    else:
        total += ri * remain
        break
print(total)

- -    def __str__(self): -        s = "v=" + str(self.v) -        s += ",w=" + str(self.w) -        s += ",r=" + str(self.r) -        return s -    v = items[i].v -    w = items[i].w -    r = items[i].r -    if w <= remain: -        total += v -        remain -= w +    vi = items[i].v +    wi = items[i].w +    ri = items[i].r +    if wi <= remain: +        total += vi +        remain -= wi -        total += r * remain +        total += ri * remain