# row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
# row = [int(input().rstrip()) for _ in range(n)]

def resolve():
    import sys
    input = sys.stdin.readline

    n, m = [int(x) for x in input().rstrip().split(" ")]

    ab = {}
    for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

    a_list = sorted(ab.keys())
    ans = 0
    for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

    print(ans)



if __name__ == "__main__":
    resolve() def resolve():
    import sys
    input = sys.stdin.readline

    n, m = [int(x) for x in input().rstrip().split(" ")]

    ab = {}
    for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

    a_list = sorted(ab.keys())
    ans = 0
    for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

    print(ans) resolve import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline int(x) for x in input().rstrip().split(" ") for x in input().rstrip().split(" ") x input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " for x in input().rstrip().split(" ") int(x) int x n, m = [int(x) for x in input().rstrip().split(" ")] n [int(x) for x in input().rstrip().split(" ")] m ab = {} ab {} for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

     _ range(n) range n int(x) for x in input().rstrip().split(" ") for x in input().rstrip().split(" ") x input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " for x in input().rstrip().split(" ") int(x) int x a, b = [int(x) for x in input().rstrip().split(" ")] a [int(x) for x in input().rstrip().split(" ")] b if a not in ab:
            ab[a] = 0
         a not in ab a ab ab[a] = 0 ab[a] ab a 0 ab[a] += b ab[a] ab a b a_list = sorted(ab.keys()) a_list sorted(ab.keys()) sorted ab.keys() ab.keys ab keys ans = 0 ans 0 for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

     a a_list if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

     m <= ab[a] m ab[a] ab a ans += m * a ans m * a m a break ans += ab[a] * a ans ab[a] * a ab[a] ab a a m -= ab[a] m ab[a] ab a print(ans) print ans if __name__ == "__main__":
    resolve() __name__ == "__main__" __name__ "__main__" resolve() resolve def resolve():
    import sys
    input = sys.stdin.readline

    n, m = [int(x) for x in input().rstrip().split(" ")]

    ab = {}
    for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

    a_list = sorted(ab.keys())
    ans = 0
    for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

    print(ans) def resolve():
    import sys
    input = sys.stdin.readline

    n, m = [int(x) for x in input().rstrip().split(" ")]

    ab = {}
    for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

    a_list = sorted(ab.keys())
    ans = 0
    for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

    print(ans) resolve
# row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
# row = [int(input().rstrip()) for _ in range(n)]

def resolve():
    import sys
    input = sys.stdin.readline

    n, m = [int(x) for x in input().rstrip().split(" ")]

    ab = {}
    for _ in range(n):
        a, b = [int(x) for x in input().rstrip().split(" ")]
        if a not in ab:
            ab[a] = 0
        ab[a] += b

    a_list = sorted(ab.keys())
    ans = 0
    for a in a_list:
        if m <= ab[a]:
            ans += m * a
            break
        else:
            ans += ab[a] * a
            m -= ab[a]

    print(ans)



if __name__ == "__main__":
    resolve()
