N, M = map(int, input().split())
drinks = [list(map(int, input().split())) for _ in range(N)]

drinks.sort()

ans = 0
for i in range(N):
    if M < drinks[i][1]:
        ans += M * drinks[i][0]
        break
    else:
        ans += drinks[i][1] * drinks[i][0]
        M -= drinks[i][1]
print(ans) N, M = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split M list(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split drinks = [list(map(int, input().split())) for _ in range(N)] drinks [list(map(int, input().split())) for _ in range(N)] drinks.sort() drinks.sort drinks sort ans = 0 ans 0 for i in range(N):
    if M < drinks[i][1]:
        ans += M * drinks[i][0]
        break
    else:
        ans += drinks[i][1] * drinks[i][0]
        M -= drinks[i][1] i range(N) range N if M < drinks[i][1]:
        ans += M * drinks[i][0]
        break
    else:
        ans += drinks[i][1] * drinks[i][0]
        M -= drinks[i][1] M < drinks[i][1] M drinks[i][1] [i] drinks i 1 ans += M * drinks[i][0] ans M * drinks[i][0] M drinks[i][0] [i] drinks i 0 break ans += drinks[i][1] * drinks[i][0] ans drinks[i][1] * drinks[i][0] drinks[i][1] [i] drinks i 1 drinks[i][0] [i] drinks i 0 M -= drinks[i][1] M drinks[i][1] [i] drinks i 1 print(ans) print ans ans += drinks[i][1] * drinks[i][0] drinks[i][1] * drinks[i][0] ans N, M = map(int, input().split()) map(int, input().split()) N drinks = [list(map(int, input().split())) for _ in range(N)] [list(map(int, input().split())) for _ in range(N)] drinks M = map(int, input().split()) map(int, input().split()) M ans += M * drinks[i][0] M * drinks[i][0] ans ans = 0 0 ans M -= drinks[i][1] drinks[i][1] M
N, M = map(int, input().split())
drinks = [list(map(int, input().split())) for _ in range(N)]

drinks.sort()

ans = 0
for i in range(N):
    if M < drinks[i][1]:
        ans += M * drinks[i][0]
        break
    else:
        ans += drinks[i][1] * drinks[i][0]
        M -= drinks[i][1]
print(ans)