output_description: Print the minimum amount of money with which Takahashi can buy M cans of
  energy drinks.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      A_1 B_1
      A_2 B_2
      \vdots
      A_N B_N
attempt: # a, b, c, d = (int(i) for i in input().split())
  # W = [int(i) for i in input().split()]
  # N= (int(input()))
  
  N, M = (int(i) for i in input().split())
  flag = 0
  A_list = []
  B_list = []
  AB_list = []
  for i in range(N):
      a, b = (int(j) for j in input().split())
      A_list.append(a)
      B_list.append(b)
      AB_list.append([a, b])
      pass
  AB_list = sorted(AB_list, key=lambda x: x[0])
  # print(AB_list)
  now = 0
  m_cnt = 0
  n_cnt = 0
  for ab in AB_list:
      # print(n_cnt + (ab[1]))
      if n_cnt + ab[1] >= M:
          a = M - n_cnt
          n_cnt += a
          m_cnt += a * ab[0]
          break
      else:
          n_cnt += ab[1]
          m_cnt += ab[1] * ab[0]
          pass
  
  print(m_cnt)
  # k_list = []
  # s_list = []
  # p_list = []
  # for i in range(M):
  #     for j in range(N):
  #         a = [int(i) for i in input().split()]
  #         k_list.append(a[0])
  #         s_list.append(a[1:])
  #         pass
  #     pass
  # p_list = [int(i) for i in input().split()]
  
  # lamp_list = []
  
  
  # #N = int(input())
  # # A = [int(i) for i in input().split()]
  # #S_dict = {}
  # #P_dict = {}
  # # for i in range(N):
  # #     tmp = input()
  # #     S = tmp.split()[0]
  # #     P = int(tmp.split()[1])
  # #     if S in S_dict.keys() and P < S_dict[S]:
  # #         pass
  # #     else:
  # #         S_dict[S] = P
  # #         pass
  # #     pass
  # # S_dict = sorted(S_dict.items())
  
  # # print(type(S_dict))
  # # name_lisy = []
  
  # # for k in S_dict:
  # #     name_lisy.append(k)
  # #     pass
  # # print(name_lisy)
  # S_list = []
  # P_list = []
  # for i in range(N):
  #     tmp = input()
  #     S = tmp.split()[0]
  #     P = int(tmp.split()[1])
  #     #print(S,P)
  #     S_list.append([S,P])
  #     #P_list.append(P)
  #     pass
  # #S_list.sort()
  # #print(S_list)
  # sorted_S_list = sorted(S_list, key=lambda x:x[1], reverse=True)
  # sorted_S_list = sorted(sorted_S_list, key=lambda x:x[0])
  # #print(sorted_S_list)
  
  # for i,k in enumerate(sorted_S_list):
  #     for j,l in enumerate(S_list):
  #         if sorted_S_list[i] == S_list[j]:
  #             print(j+1)
  #             break
  #         pass
  #     pass
  
  
  # #print(P_list)
  
  # for i in range(M):
  #     # A.sort()
  #     if min(A) < C_list[i]:
  #         for j in range(B_list[i]):
  #             if min(A) < C_list[i]:
  #                 A.append(C_list[i])
  #                 pass
  #             pass
  #         A.sort(reverse=True)
  #         A = A[:N]
  #         pass
  #     pass
  # #sum(A[:N-1])
  # print(sum(A[:N]))
  # for i in range(M):
  #     A.sort()
  #     cnt = 0
  #     for j in range(N):
  #         if cnt < B_list[i] and A[j] < C_list[i]:
  #             A[j] = C_list[i]
  #             cnt += 1
  #             pass
  #         pass
  #     #print(A)
  #     pass
  # print(sum(A))
  
  
  # L_max = max(L_list)
  # R_min = min(R_list)
  # for i in range(M):
  #     pass
  
  # if R_min-L_max+1 < 0:
  #     print("0")
  # else:
  
  #     print(R_min-L_max+1)
  # if A <= 5:
  #     print(0)
  # elif 5 < A and A <= 12:
  #     print(int(B/2))
  # else:
  #     print(B)
  
problem_description: Statement
  
  Hearing that energy drinks increase rating in those sites, Takahashi decides
  to buy up M cans of energy drinks.
  
  There are N stores that sell energy drinks. In the i-th store, he can buy at
  most B_i cans of energy drinks for A_i yen (the currency of Japan) each.
  
  What is the minimum amount of money with which he can buy M cans of energy
  drinks?
  
  It is guaranteed that, in the given inputs, a sufficient amount of money can
  always buy M cans of energy drinks.
samples: [{"input": "2 5\n    4 9\n    2 4", "output": "12\n    \n\nWith 12 yen, we can buy one drink at the first store and four drinks at the\nsecond store, for the total of five drinks. However, we cannot buy 5 drinks\nwith 11 yen or less.\n\n* * *"}, {"input": "4 30\n    6 18\n    2 5\n    3 10\n    7 9", "output": "130\n    \n\n* * *"}, {"input": "1 100000\n    1000000000 100000", "output": "100000000000000\n    \n\nThe output may not fit into a 32-bit integer type."}]