#C - Energy Drink Collector
N,M = map(int,input().split())
A_B = [tuple(map(int,input().split())) for _ in range(N)]

A_B = sorted(A_B, key = lambda x:x[1],reverse = True)
A_B = sorted(A_B, key = lambda x:x[0], reverse = False)

pay = 0
drink = M
for A, B in A_B:
    if drink <= B:
        pay += A*drink
        break
    else:
        pay += A*B
        drink -= B
print(pay) N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M tuple(map(int,input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split A_B = [tuple(map(int,input().split())) for _ in range(N)] A_B [tuple(map(int,input().split())) for _ in range(N)] A_B = sorted(A_B, key = lambda x:x[1],reverse = True) A_B sorted(A_B, key = lambda x:x[1],reverse = True) sorted A_B key = lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse = True reverse True A_B = sorted(A_B, key = lambda x:x[0], reverse = False) A_B sorted(A_B, key = lambda x:x[0], reverse = False) sorted A_B key = lambda x:x[0] key lambda x:x[0] x[0] x 0 x reverse = False reverse False pay = 0 pay 0 drink = M drink M for A, B in A_B:
    if drink <= B:
        pay += A*drink
        break
    else:
        pay += A*B
        drink -= B A B A_B if drink <= B:
        pay += A*drink
        break
    else:
        pay += A*B
        drink -= B drink <= B drink B pay += A*drink pay A*drink A drink break pay += A*B pay A*B A B drink -= B drink B print(pay) print pay pay = 0 0 pay A_B = [tuple(map(int,input().split())) for _ in range(N)] [tuple(map(int,input().split())) for _ in range(N)] A_B drink = M M drink pay += A*drink A*drink pay M = map(int,input().split()) map(int,input().split()) M A_B = sorted(A_B, key = lambda x:x[1],reverse = True) sorted(A_B, key = lambda x:x[1],reverse = True) A_B pay += A*B A*B pay drink -= B B drink N,M = map(int,input().split()) map(int,input().split()) N A_B = sorted(A_B, key = lambda x:x[0], reverse = False) sorted(A_B, key = lambda x:x[0], reverse = False) A_B
#C - Energy Drink Collector
N,M = map(int,input().split())
A_B = [tuple(map(int,input().split())) for _ in range(N)]

A_B = sorted(A_B, key = lambda x:x[1],reverse = True)
A_B = sorted(A_B, key = lambda x:x[0], reverse = False)

pay = 0
drink = M
for A, B in A_B:
    if drink <= B:
        pay += A*drink
        break
    else:
        pay += A*B
        drink -= B
print(pay)