Harryxun/stf_run huggingface dataset:
c=int(input())
if c == a :
    print("b")
elif c == b :
    print("c")
elif c == c :
    print("d")
elif c == d :
    print("e")
elif c == e :
    print ("f")
elif c == f :
    print("g")
elif c == g :
    print("h")
elif c == h :
    print("i")
elif c == i :
    print("j")
elif c == j :
    print("k")
elif c == k :
    print("l")
elif c == l :
    print("m")
elif c == m :
    print("n")
elif c == n :
    print("o")
elif c == o :
    print("p")
elif c == p :
    print("q")
elif c == q :
    print("r")
elif c== r :
    print("s")
elif c == s :
    print("t")
elif c == t :
    print("u")
elif c == u :
    print("v")
elif c == v :
    print("w")
elif c == w :
    print("x")
elif c == x :
    print("y")
elif c == y :
    print("z")

### FIXED CODE ###

c=str(input())
if c == 'a' :
    print("b")
elif c == 'b' :
    print("c")
elif c == 'c' :
    print("d")
elif c == 'd' :
    print("e")
elif c == 'e' :
    print ("f")
elif c == 'f' :
    print("g")
elif c == 'g' :
    print("h")
elif c == 'h' :
    print("i")
elif c == 'i' :
    print("j")
elif c == 'j' :
    print("k")
elif c == 'k' :
    print("l")
elif c == 'l' :
    print("m")
elif c == 'm' :
    print("n")
elif c == 'n' :
    print("o")
elif c == 'o' :
    print("p")
elif c == 'p' :
    print("q")
elif c == 'q' :
    print("r")
elif c == 'r' :
    print("s")
elif c == 's' :
    print("t")
elif c == 't' :
    print("u")
elif c == 'u' :
    print("v")
elif c == 'v' :
    print("w")
elif c == 'w' :
    print("x")
elif c == 'x' :
    print("y")
elif c == 'y' :
    print("z")
k = int(input())
s = inpur()
x = len(s)

if k >= s:
  print(s)

else:
  print(s + "...")

### FIXED CODE ###

k = int(input())
s = input()
x = len(s)
if x <= k :
  print(s)
else:
  print(s[0:k] + "...")
a,b = map(int,input().split())
mylist = input().split()
mylist.sort()
c = 0
for i in range(b-1):
    c = c + int(mylist[i-1])
print(c)

### FIXED CODE ###

a = str(input())
b = a.upper()
c = a.lower()
if b == a :
    print("A")
if c == a :
    print("a")
s = int(input())
an = []
an.append(s)
n = s
while an.count(4) != 2:
    if n % 2 == 0:
        n /= 2
        an.append(int(n))
    else:
        n = 3 * n + 1
        an.append(int(n))
if an.index(1 or 2) == 0:
    print(4)
else:
    print(an.index(4) + 4)


### FIXED CODE ###

x, y, z = map(int, input().split())
print(int(x * y / 2))
t = list(map(int, input()))
one = t.count(1)
print(one*(one+1)//2-2)

### FIXED CODE ###

def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    h1, m1, h2, m2, k = mput()
    hoge = h1*60+m1
    huga = h2*60+m2-k
    piyo = huga - hoge
    print(piyo)
    return 0

if __name__ == "__main__":
    solve()
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

N=I()
A=LI()
B = []
counts = collections.Counter(A)
for count in counts.keys():
    if counts[count] >= 2:
        B.append(count)
B.sort(reversed=True)
if len(B) < 2:
    print(0)
else:
    print(B[0]*B[1])
    

### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def pf(s): return print(s, flush=True)

N=I()
A=LI()
B = []
counts = collections.Counter(A)
for count in counts.items():
    if count[1] >= 2:
        B.append(count)
B.sort(reverse=True)
if len(B) ==0:
    print(0)
elif len(B) == 1:
    if B[0][1] >= 4:
        print(B[0][0]**2)
    else:
        print(0)
else:
    if B[0][1] >= 4:
        print(B[0][0]**2)
    else:
        print(B[0][0]*B[1][0])
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(”-1”)

### FIXED CODE ###

a,b = map(int, input().split())
flag = 0
for i in range(10*b, 10*b+10):
	if int(i * 0.08) == a:
		if flag == 0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)
x = int(input())
for i in range(100000):
	if x * i % 360 == 0:
	print(i)
	    exit()


### FIXED CODE ###

x = int(input())
for i in range(1, 100000):
  if x * i % 360 == 0:
    print(i)
    exit()
N = int(input())
T = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    T[a].append(b)
    T[b].append(a)


colors = [-1] * N
stack = [(0, 0)]
while stack:
    n, color = stack.pop()
    colors[n] = color
    for to in T[n]:
        if colors[to] != -1:
            continue
        stack.append((to, color ^ 1))


# あまり１、あまり２、あまり０になるように並び替え
X = [[] for _ in range(3)]
for n in range(1, N + 1):
    X[n % 3].append(n)
X.append(X[0])
del X[0]


# 少ない色の方は優先的に３の倍数を使うようにして塗る
ans = []
for color in colors:
    if X[color ^ 1]:
        ans.append(X[color ^ 1].pop())
    else:
        ans.append(X[2].pop())

print(' '.join(map(str, ans)))


### FIXED CODE ###

N = int(input())
T = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    T[a].append(b)
    T[b].append(a)


colors = [-1] * N
stack = [(0, 0)]
while stack:
    n, color = stack.pop()
    colors[n] = color
    for to in T[n]:
        if colors[to] != -1:
            continue
        stack.append((to, color ^ 1))


# あまり１、あまり２、あまり０になるように並び替え
X = [[] for _ in range(3)]
for n in range(1, N + 1):
    X[n % 3].append(n)
X.append(X[0])
del X[0]


ans = []
x12, x3 = X[0] + X[1], X[2]
if colors.count(0) <= N // 3:
    for color in colors:
        if color == 0:
            ans.append(x3.pop())
        elif x12:
            ans.append(x12.pop())
        else:
            ans.append(x3.pop())

elif colors.count(1) <= N // 3:
    for color in colors:
        if color == 1:
            ans.append(x3.pop())
        elif x12:
            ans.append(x12.pop())
        else:
            ans.append(x3.pop())

else:
    for color in colors:
        if X[color]:
            ans.append(X[color].pop())
        else:
            ans.append(X[2].pop())

print(' '.join(map(str, ans)))
#入力
n, k = map(int, input().split())
d = input().split()
stop = min(10000, n * 10)

for l in range(n, stop):
  a = str(n)
  flag = 0
  for i in range(len(a)):
    for j in range(k):
      if a[i] != d[j]:
        flag += 1
      else:
        n += 1
        break
    if (flag % k) != 0 and flag == 0:
      break
  if flag == len(a) * k:
    break
print(n)

### FIXED CODE ###

a, b, c = map(int, input().split())

if a == 7:
  if b == 5 and c ==5:
    print("YES")
  else:
    print("NO")
elif a == 5:
  if (b == 5 and c == 7) or (b == 7 and c == 5):
    print("YES")
  else:
    print("NO")
else:
  print("NO")
h, w, n = map(int, input().split())
from collections import defaultdict
d = defaultdict(int)
surround = [(0, 0), (1,1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1)]
for _ in range(n):
    x, y  = map(int, input().split())
    x -= 1
    y -= 1
    for i in surround:
        if x + i[0] >= w or x + i[0] < 0 or y + i[1] < 0 or y + i[1] >= h:
            continue
        else:
            d[(x+i[0], y + i[1])] += 1
num = [0]*9
for key in d:
    if key[0] >= 1 and key[0] < h -1 and key[1] >= 1 and key[1] < w-1:
        num[d[key]] += 1
        
num[0] = (h-2)*(w-2) - sum(num)

for ans in num:
    print(ans)


### FIXED CODE ###

h, w, n = map(int, input().split())
from collections import defaultdict
d = defaultdict(int)
surround = [(0, 0), (1,1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1), (0, 1)]
for _ in range(n):
    x, y  = map(int, input().split())
    x -= 1
    y -= 1
    for i in surround:
        if x + i[0] >= h or x + i[0] < 0 or y + i[1] < 0 or y + i[1] >= w:
            continue
        else:
            d[(x+i[0], y + i[1])] += 1
num = [0]*10
for key in d:
    if key[0] >= 1 and key[0] < h -1 and key[1] >= 1 and key[1] < w-1:
        num[d[key]] += 1

num[0] = (h-2)*(w-2) - sum(num)

for ans in num:
    print(ans)
# Here your code !
import math
r=int(input())
print(r*2*math.pi,r**2*math.pi)

### FIXED CODE ###

import math
r=float(input())
print(r**2*math.pi,r*2*math.pi)
N = int(input())
A = [int(input()) for _ in range(N)]

A = sorted(A)
print(sum(A[1:])

### FIXED CODE ###

N = int(input())
A = [int(input()) for _ in range(N)]

M = max(A)
M_index = A.index(M)
sub_M = 0
for i in range(N):
  if i != M_index: sub_M = max(sub_M, A[i])

for i in range(N):
  if i == M_index: print(sub_M)
  else: print(M)
from itertools import groupby
from itertools import itemgetter

a = groupby(sorted(input() for _ in range(int(input()))))
a = [(len(tuple(g)), s) for s, g in a]
m = max(a, key=itemgetter(0))[0]
for k, s in a:
  if k == m:
    print(s)


### FIXED CODE ###

from collections import Counter
from itertools import groupby
from operator import itemgetter

c = Counter(input() for _ in range(int(input())))
a = sorted((-c[x],x) for x in c)
for _, s in next(groupby(a, itemgetter(0)))[1]:
  print(s)
n = int(input())
cards = {} #空の辞書
for i in range(n):
    card = input()
    cards[card] = 1

#print(cards)

for c in range['S','H','C ','D']:
    for n in range(1,13):
        key = C + ' '+ str(n)
        if not key in cards:
            print(key)



### FIXED CODE ###

n = int(input())
cards = {} #空の辞書
for i in range(n):
    card = input()
    cards[card] = 1
     
#print(cards)
 
for c in ['S', 'H', 'C', 'D']:
    for n in range(1,14):
        key = c + ' ' + str(n)
        if not key in cards:
            print(key)
import math
ans = 0

K = int(input())

for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      ans += math.gcd(i,j,k)
      
print(ans)

### FIXED CODE ###

import math
ans = 0

K = int(input())

for i in range(1,K+1):
  for j in range(1,K+1):
    for k in range(1,K+1):
      ans += math.gcd(i,math.gcd(j,k))
      
print(ans)
input()

s = list(input())
r =[]
g =[]
b =[]
n= len(s)
ans =0
for i in range(n):
    if s[i]== "R":
        r.append(i+1)
    elif s[i]== "G":
        g.append(i+1)
    else:
        b.append(i+1)

for ss in itertools.product(r,g,b):
    sss =sorted(ss)
    if sss[2] + sss[0] != 2*sss[1]:
        ans +=1

print(ans)

### FIXED CODE ###

import sys
import math
import itertools
from functools import reduce
from functools import lru_cache


# \n
def input():
    return sys.stdin.readline().rstrip()

def main():

    N=int(input())
    S=list(input())

    R=[0]*N
    G=[0]*N
    B=[0]*N
    r=0
    g  =0
    b=0
    count =0
    for i in range(N-1,-1,-1):
        if S[i] =="R":
            r+=1
        elif S[i] =="G":
            g+=1
        else:
            b+=1
        R[i]=r
        G[i]=g
        B[i]=b

    count =0
    for i in range(N):



        for j in range(i+1,N):
            SE = set(["R", "G", "B"])
            I = S[i]
            SE.remove(I)
            J =S[j]
            if I==J:
                continue
            SE.remove(J)
            if "G" in SE:
                count+=G[j]
                if j+j-i <N and S[j+j-i] =="G":
                    count -=1

            elif "R" in SE:
                count+=R[j]
                if j+j-i <N and S[j+j-i] =="R":
                    count -=1
            else:
                count+=B[j]
                if j+j-i <N and S[j+j-i] =="B":
                    count -=1



    print(count)


if __name__ == "__main__":
    main()
N, Q = map(int, input().split())
S = str(input())
cnt = 0
count = [0]*(N+1)
lists_l = []
lists_r = []
for i in range(N):
    if S[i] == "A" and S[i + 1] == "C":
        count[i + 1] = count[i] + 1
    else:
        count[i + 1] = count[i]
for i in range(Q):
    l, r = map(int, input().split())
    lists_l.append(l)
    lists_r.append(r)
for i in range(Q):
    L = lists_l[i]
    R = lists_r[i]
    print(count[R-1] - count[L-1])


### FIXED CODE ###

N, Q = map(int, input().split())
ruisekiwa = [0]
lists = []
cnt = 0
S = str(input())
for t in range(1, N):
    if S[t - 1] == "A" and S[t] == "C":
        cnt += 1
    ruisekiwa.append(cnt)
ruisekiwa.append(cnt)
for i in range(Q):
    l, r = map(int, input().split())
    ans = ruisekiwa[r - 1] - ruisekiwa[l - 1]
    lists.append(ans)
for m in range(len(lists)):
    print(lists[m])
a=int(input())
b=int(input())
if a<0 or b<0 :
    print("negative!")
elif a>10000 or b>10000 :
    print("too big!")
elif a*b%2==0 :
    print("Even")
else :
    print("Odd")

### FIXED CODE ###

a,b = map(int,input().split())
if a<0 or b<0 :
    print("negative!")
elif a>10000 or b>10000 :
    print("too big!")
elif a*b%2==0 :
    print("Even")
else :
    print("Odd")
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

for i in range(M - 1):
    if A[i] + 1 == A[i + 1]:
        print(0)
        exit()

memo = [0 for i in range(N + 10)]
memo[1] = 1
memo[2] = 2
for i in range(3, N + 10):
    memo[i] = memo[i - 1] + memo[i - 2]

ans = 1
for i in range(M):
    if i == 0:
        tmp = A[i] - 1
        if tmp == 0:
            tmp = 1
    else:
        tmp = A[i] - A[i - 1] - 2
    ans *= memo[tmp]
    ans %= int(1e9 + 7)

if N - A[-1] - 1 != 0:
    ans *= memo[(N - A[-1] - 1)]
    ans %= int(1e9 + 7)
print(ans)



### FIXED CODE ###

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

for i in range(M - 1):
    if A[i] + 1 == A[i + 1]:
        print(0)
        exit()

MAX_N = int(1e5) + 10
memo = [0 for i in range(MAX_N + 10)]
memo[0] = 1
memo[1] = 1
memo[2] = 2
for i in range(3, MAX_N + 10):
    memo[i] = memo[i - 1] + memo[i - 2]

now = 0
ans = 1

for a in A:
    diff = a - now - 1
    ans *= memo[diff]
    ans %= int(1e9 + 7)
    now = a + 1

diff = N - now
ans *= memo[diff]
ans %= int(1e9 + 7)
print(ans)
n=int(input())
s=[list(input()) for _ in range(3)]
cnt=0
for i in range(len(s)):
  cnt+=len(set([s[0][i],s[1][i],s[2][i]]))-1
print(cnt)

### FIXED CODE ###

n=int(input())
s=[list(input()) for _ in range(3)]
cnt=0
for i in range(n):
  cnt+=len(set([s[0][i],s[1][i],s[2][i]]))-1
print(cnt)
def main():
    N = int(input())
    A = list(map(int, input().split()))
    Q = int(input())

    answer = sum(A)
    numNumberList = [0] * 100000

    for Ai in A:
        numNumberList[Ai] = A.count(Ai)

    for i in range(Q):
        B, C = list(map(int, input().split()))
        answer = answer + (int(C) - int(B)) * numNumberList[B]

        numNumberList[C] = numNumberList[C] + numNumberList[B]
        numNumberList[B] = 0

        print(answer)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys

def main():
    N = int(input())
    A = list(map(int, input().split()))
    Q = int(input())

    answer = sum(A)
    setA = set(A)
    numNumberList = [0] * 100001

    for Ai in A:
        numNumberList[Ai] = numNumberList[Ai] + 1    

    for i in range(Q):
        B, C = list(map(int, sys.stdin.readline().split()))
        answer = answer + (int(C) - int(B)) * numNumberList[B]

        numNumberList[C] = numNumberList[C] + numNumberList[B]
        numNumberList[B] = 0

        print(answer)

if __name__ == "__main__":
    main()
from operator import mul
from functools import reduce


def cmb(n, r):
    r = min(n - r, r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()


### FIXED CODE ###

from math import factorial


def cmb(n, r):
    return factorial(n) // factorial(r) // factorial(abs(n - r))


def p_d():
    N, K = map(int, input().split())
    n = N - K + 1
    mod = 10 ** 9 + 7

    for i in range(1, K + 1):
        c = cmb(n, i)
        k = cmb(K - 1, i - 1)
        print(c * k % mod)


if __name__ == '__main__':
    p_d()
n, k, q = map(int, input().split())
alist = list(map(int, input().split()))
ans = None
for i, a in enumerate(alist):
  spla = []
  preva = -1
  ailist = alist[:i] + alist[i+1:]
  for j, _a in enumerate(ailist):
    if _a < a:
      spla.append(ailist[preva+1:j])
      preva = j
  if not preva == len(ailist)-1:
    spla.append(ailist[preva+1:])
  conda = []
  for sa in spla:
    if len(sa) >= k:
      conda.extend(list(sorted(sa))[:len(sa)-k+1])
  if len(conda) < q-1:
    continue
  else:
    y = list(sorted(conda))[q-2]
    if ans is None or ans > y - a:
      ans = y - a

print(ans)


### FIXED CODE ###

n, k, q = map(int, input().split())
alist = list(map(int, input().split()))
ans = None
if q == 1:
  print(0)
else:
  for i, a in enumerate(alist):
    spla = []
    preva = -1
    ailist = alist[:i] + alist[i+1:]
    for j, _a in enumerate(ailist):
      if _a < a:
        spla.append(ailist[preva+1:j])
        preva = j
    if not preva == len(ailist)-1:
      spla.append(ailist[preva+1:])
    conda = []
    for sa in spla:
      if len(sa) >= k:
        conda.extend(list(sorted(sa))[:len(sa)-k+1])
    if len(conda) < q-1:
      continue
    else:
      y = list(sorted(conda))[q-2]
      if ans is None or ans > y - a:
        ans = y - a

  print(ans)
from sys import stdin

a, b = stdin.readline().rstrip().split()
ab = a * b

if ab % 2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]
ab = a * b

if ab % 2 == 0:
    print("Even")
else:
    print("Odd")
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    x,y,x = LI()
    print(z,x,y)
main()

### FIXED CODE ###

import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip.split())
def main():
    x,y,z = LI()
    print(z,x,y)
main()
#-*-coding:utf-8-*-

import math

def calculate_length(A,B,theta):
    radian=math.radians(theta)
    length=(A**2)+(B**2)-(2*A*B*math.cos(math.radians(theta)))
    return  math.sqrt(length)

def main():
    A,B,H,M = map(int,input().split())
    thetaA=H*30+M*0.5
    thetaB=M*6
    if thetaA> thetaB:
        theta=thetaA-thetaB
    elif thetaA < thetaB:
        theta = thetaB-thetaA
    elif thetaA==thetaB:
        print("0")
    length=calculate_length(A,B,theta)
    print(length)

if __name__=="__main__":
    main()

### FIXED CODE ###

#-*-coding:utf-8-*-

import math

def calculate_length(A,B,rad):
    length=(A**2)+(B**2)-(2*A*B*math.cos(math.pi*rad/180))
    return  math.sqrt(length)

def main():
    A,B,H,M = map(int,input().split())
    rad = abs((H*60+M)*0.5-M*6)
    length=calculate_length(A,B,rad)
    print(length)

if __name__=="__main__":
    main()
h, w = map(int, input("").split(''))

print(ceil(w/2) * ceil(h/2) * (floor(w/2) * floor(h/2))

### FIXED CODE ###

from math import *
h, w = map(int, input('').split(' '))

if h > 1 and w > 1:
	print(ceil(w/2) * ceil(h/2) + floor(w/2) * floor(h/2) )
else:
  print(1)
def main():
    A, B = raw_input().split(' ')
    print('{}'.format((A+B)%24))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    A, B = tuple(map(int, input().split(' ')))
    print('{}'.format((A+B)%24))


if __name__ == '__main__':
    main()
n=raw_input()
x=raw_input().split()

for i in reversed(xrange((len(x))):
  print x[i],

### FIXED CODE ###

n = int(raw_input())
a = map(int,raw_input().split())
a.reverse()
for i in a:
    print i,
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
c=0
import numpy as np
A=np.array(A).cumsum()
B=np.array(B).cumsum()
for i in range(N):
  d=K-A[i]
  if d>=0:
    for j in reversed(range(M)):
      if d>=B[j]:
        if c<i+j+2:
          c=i+j+2
        M=j+1
        break
    if d<B[0]:
      c=i+1
  else:
    for j in reverse(range(M)):
      if K-B[j]>=0:
        if c<j+1:
          c=j+1
        break
    break
print(c)

### FIXED CODE ###

N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
c=0
k=M
import numpy as np
A=np.array(A).cumsum()
B=np.array(B).cumsum()
for i in range(N):
  d=K-A[i]
  if d<0:
    for j in reversed(range(M)):
      if K-B[j]>=0:
        if c<j+1:
          c=j+1
        break
    break
  else:
    for j in reversed(range(k)):
      if d>=B[j]:
        if c<i+j+2:
          c=i+j+2
        k=j+1
        break
    if d<B[0]:
      if c<i+1:
        c=i+1
      k=0
for j in reversed(range(M)):
  if K-B[j]>=0:
    if c<j+1:
      c=j+1
print(c)
X = int(input())

n = math.floor(X/100)
remain = X % 100
print(n>= 1 && remain <= n*5)

### FIXED CODE ###

X = int(input())

for i in range(X+1):
  if X >= 100*i and X <= 105*i:
    print(1)
    exit(0)
print(0)
r = input()
s = 3*r**2
print(s)

### FIXED CODE ###

r = int(input())
s = 3*r**2
print(s)
s = input
print("Yes" if s[2]==s[3] and s[4]==s[5] else "No")

### FIXED CODE ###


s = input()

if(s[2]==s[3] and s[4]==s[5]):
    print("Yes")
else:
    print("No")
import sys

def main():
  n = int(sys.stdin.readline())
  for _ in range(n):
    line = sys.stdin.readline()
    print(line.strip().replace("Hoshino", "Hoshina"), end="\n")

if __name__ == "__main__":
  main()

### FIXED CODE ###

import sys

def main():
  n = int(sys.stdin.readline())
  for _ in range(n):
    line = sys.stdin.readline()
    print(line.rstrip().replace("Hoshino", "Hoshina"))

if __name__ == "__main__":
  main()
n, m = (int(i) for i in input().split())  
a = [[int(i) for i in input().split()] for i in range(n)] 
dic = {}
lis = []

for x in a:
  if x[0] not in dic:
  	dic[x[0]] = x[1]
  else:
    dic[x[0]] += x[1]

sorted_dict = sorted(dic.items(), key=lambda x:x[0])

count = 0
for x in sorted_dict:
  if len(lis) > m:
    break
  else:
    lis += [int(x[0])] * int(x[1])
    count += x[1]
  
#print(lis)
print(sum(lis[:m]))

### FIXED CODE ###

n, m = (int(i) for i in input().split())  
a = [[int(i) for i in input().split()] for i in range(n)] 
dic = {}
lis = []

a.sort()
ans = 0
for x in a:
  if x[1] >= m:
    ans += x[0] * m
    break
  else:
    ans += x[0] * x[1]
    m -= x[1]

print(ans)