Harryxun/stf_run huggingface dataset:
# coding: utf-8
# Your code here!
import math
import numpy as np

string = input().split()
A = float(string[0])
B = float(string[1])

keta = np.log10(float(math.floor(A*B)))


def mypow(nuko):
    pai = 1
    for i in range(int(nuko)):
        pai = pai * 10
    return pai
    

hoge = np.log10(B)
neko = mypow(keta-(hoge+2)) 

print(int( math.floor(A*B) - (math.floor(A*B) % neko) ) )



### FIXED CODE ###

# coding: utf-8
# Your code here!
import math
import numpy as np


string = input().split()
A = int(string[0]) 
B = int (round(float(string[1]) * 100))

print(int(int( (A*B) )//int(100)))
a,b,c,d,e,f=map(int,input().split())
a*=100
b*=100
x=set()
for i in range(f//a+1):
    for j in range(f//b+1):
        if 0<(a*i+b*j)<=f:
            x.add(a*i+b*j)
y=set()
for i in range(f//c+1):
    for j in range(f//d+1):
        if 0<c*i+d*j<=f:
            y.add(c*i+d*j)

ans=[]
noudoma=e/100
for n in x:
    for m in y:
        if m/n<=noudoma and (n+m)<=f:
            ans.append([n+m,m,m/(n+m)])

ans.sort(key=lambda x:x[2], reverse=True)


print(ans[0][0],ans[0][1])


### FIXED CODE ###

a,b,c,d,e,f=map(int,input().split())
a*=100
b*=100
x=set()
for i in range(0,f+1,a):
    for j in range(0,f+1,b):
        if 0<(i+j)<=f:
            x.add(i+j)
y=set()
for i in range(0,f+1,c):
    for j in range(0,f+1,d):
        if 0<(i+j)<=f:
            y.add(i+j)

ans=[]
for n in x:
    for m in y:
        if n+m>f:
            continue
        if n*e<m*100:
            continue
        ans.append([n+m,m,m/n])
if not ans:
    print(a,0)
    exit()
ans.sort(key=lambda x:x[2], reverse=True)

print(ans[0][0],ans[0][1])
import math
import typing
from typing import List
import numpy as np
from itertools import accumulate, chain, islice, starmap
N = int(input())
numbers = list(map(int, input().split()))
# numbers = [2, 4, 8, 8]
# N = len(numbers)


def calculate_maximum_subgcd_with_np_ufunc(numbers: np.ndarray) -> int:
    gcd = np.frompyfunc(math.gcd, 2, 1)
    cumgcds = gcd.accumulate(numbers, dtype=np.object).astype(np.int)
    sub_cumgcds = np.roll(cumgcds, 1)
    sub_cumgcds[0] = 0
    reverse_cumgcds = gcd.accumulate(
        numbers[::-1], dtype=np.object).astype(np.int)
    sub_reverse_cumgcds = np.roll(reverse_cumgcds, 1)
    sub_reverse_cumgcds[0] = 0
    return np.max(gcd(sub_cumgcds, sub_reverse_cumgcds[::-1]))


def calculate_maximum_subgcd_with_func(numbers: List[int]) -> int:
    operation = math.gcd
    cumgcds = accumulate(numbers, operation)
    sub_cumgcds = islice(chain([0], cumgcds), len(numbers))
    reverse_cumgcds = accumulate(numbers[::-1], operation)
    sub_reverse_cumgcds = islice(chain([0], reverse_cumgcds), len(numbers))
    sub_gcds = starmap(operation, zip(sub_cumgcds, list(sub_reverse_cumgcds)[::-1]))
    return max(sub_gcds)


# calculate_maximum_subgcd = calculate_maximum_subgcd_with_np_ufunc
calculate_maximum_subgcd = calculate_maximum_subgcd_with_func

print(calculate_maximum_subgcd(numbers))


### FIXED CODE ###

# import math
import fractions
import numpy as np
from itertools import accumulate, chain, islice, starmap
N = int(input())
numbers = list(map(int, input().split()))
# numbers = [2, 4, 8, 8]
# N = len(numbers)


def calculate_maximum_subgcd_with_np_ufunc(numbers):
    gcd = np.frompyfunc(fractions.gcd, 2, 1)
    cumgcds = gcd.accumulate(numbers, dtype=np.object).astype(np.int)
    sub_cumgcds = np.roll(cumgcds, 1)
    sub_cumgcds[0] = 0
    reverse_cumgcds = gcd.accumulate(
        numbers[::-1], dtype=np.object).astype(np.int)
    sub_reverse_cumgcds = np.roll(reverse_cumgcds, 1)
    sub_reverse_cumgcds[0] = 0
    return np.max(gcd(sub_cumgcds, sub_reverse_cumgcds[::-1]))


def calculate_maximum_subgcd_with_func(numbers):
    operation = fractions.gcd
    cumgcds = accumulate(numbers, operation)
    sub_cumgcds = islice(chain([0], cumgcds), len(numbers))
    reverse_cumgcds = accumulate(numbers[::-1], operation)
    sub_reverse_cumgcds = islice(chain([0], reverse_cumgcds), len(numbers))
    sub_gcds = starmap(operation, zip(sub_cumgcds, list(sub_reverse_cumgcds)[::-1]))
    return max(sub_gcds)


# calculate_maximum_subgcd = calculate_maximum_subgcd_with_np_ufunc
calculate_maximum_subgcd = calculate_maximum_subgcd_with_func

print(calculate_maximum_subgcd(numbers))
N=int(input())
T=int(input())
A=int(input())
"候補地の標高"
H=[]
for i in range(N):
    H.append(int(input()))


def abs_1(x):
    return abs(A-(T-x*0.006))

abslists=list(map(abs_1,H))

print(abslists)

print(min(abslists))

print(abslists.index(min(abslists))+1)

### FIXED CODE ###

n=int(input())
t,a=map(int,input().split())
lists=[abs(a-(t-x*0.006)) for x in map(int,input().split())]
print(lists.index(min(lists))+1)
n, k = map(int, input().split())
def make_fact(n):#0~nの階乗を求める
    fact = [1]*(n+1)
    for i in range(1, n+1):
        fact[i] = fact[i-1]*i%mod
    return fact
fact = make_fact(n*2) #＠
def make_fact_inv(n):#0~nの階乗のmodに関する逆元を求める
    fact_inv = [1]*(n+1)
    fact_inv[n] = pow(fact[n], mod-2, mod)#フェルマーの小定理
    for i in range(n, 0, -1):
        fact_inv[i-1] = fact_inv[i]*i%mod
    return fact_inv
fact_inv = make_fact_inv(n*2)#＠
def comb(n, k):#nCk
    return fact[n]*fact_inv[k]*fact_inv[n-k]%mod
mod = 10**9+7
ans = 0
for i in range(n):
    m = n-i
    c = n-m
    if c+i>k*2 or (c+i)%2 != k%2:
        continue
    ans+=comb(n, i)*comb(m+c-1, m-1)%mod
    ans%=mod
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
mod = 10**9+7
def make_fact(n):#0~nの階乗を求める
    fact = [1]*(n+1)
    for i in range(1, n+1):
        fact[i] = fact[i-1]*i%mod
    return fact
fact = make_fact(n*2) #＠
def make_fact_inv(n):#0~nの階乗のmodに関する逆元を求める
    fact_inv = [1]*(n+1)
    fact_inv[n] = pow(fact[n], mod-2, mod)#フェルマーの小定理
    for i in range(n, 0, -1):
        fact_inv[i-1] = fact_inv[i]*i%mod
    return fact_inv
fact_inv = make_fact_inv(n*2)#＠
def comb(n, k):#nCk
    return fact[n]*fact_inv[k]*fact_inv[n-k]%mod
mod = 10**9+7
ans = 0
for i in range(n):
    m = n-i
    c = n-m
    if c+i>k*2:
        continue
    ans+=comb(n, i)*comb(m+c-1, m-1)%mod
    ans%=mod
print(ans)
h,w = map(int,input().split())
#0が進めるところ、1は無理
lis = [[1 if l == '#' else 0 for l in list(input())] for _ in range(h)]
#ゴールは9
lis[h-1][w-1] = 9
#print(lis)
#[[0, 0, 1], [1, 0, 0], [0, 0, 9]]

#この問題ではbfsを始める前に、もともと壁だったところの数を記録しておく
road = 0
for row in lis:
    for column in row:
        if column != 1:
            road +=1

count = 0
#(開始x,開始y,移動回数)
pos = [[0,0,0]]
while len(pos)>0:
    x,y,depth = pos.pop(0)

    if lis[x][y] == 9:
        count = depth
        break

    #探索済みのところは、1にする
    lis[x][y] = 1

    #遷移先は0or9なので、1以外なら行ける
    if x-1>=0 and lis[x-1][y] != 1:
        pos.append([x-1,y,depth+1])
    if x+1<h and lis[x+1][y] != 1:
        pos.append([x+1,y,depth+1])
    if y-1>=0 and lis[x][y-1] != 1:
        pos.append([x,y-1,depth+1])
    if y+1<w and lis[x][y+1] != 1:
        pos.append([x,y+1,depth+1])

#(全マス) - (壁) - (移動する道順上のマスの数 ＝ 最短の移動回数＋１）
if coun == 0:
    print(-1)
else:
    print(road-(count+1))

### FIXED CODE ###

h,w = (int(x) for x in input().split())
ab = []
count = 0
for _ in range(h):
    a = input()
    a = a+'#'
    ab.append(list(a))
    for i in a:
        if i == '.':
            count += 1
ab.append(list('#'*w))
dp = [[0 for i in range(w)] for j in range(h)]
 
step = [[0, 0]]
dp[0][0] = 1
 
while len(step) > 0:
    y, x = step.pop(0)
    if y == h-1 and x == w-1:
        print(count-dp[y][x])
        exit()
    if ab[y+1][x] == '.' and dp[y+1][x] == 0 :
        step.append([y+1, x])
        dp[y+1][x] = dp[y][x] + 1
    if ab[y][x+1] == '.' and dp[y][x+1] == 0 :
        step.append([y, x+1])
        dp[y][x+1] = dp[y][x] + 1
    if ab[y-1][x] == '.' and dp[y-1][x] == 0 :
        step.append([y-1, x])
        dp[y-1][x] = dp[y][x] + 1
    if ab[y][x-1] == '.' and dp[y][x-1] == 0 :
        step.append([y, x-1])
        dp[y][x-1] = dp[y][x] + 1
 
 
print(-1)
import math

N = input().split()

A = int(N[0])
B = int(N[1])

lcm = int(A * B / math.gcd(A, B))

print(lcm)


### FIXED CODE ###

from fractions import gcd

N = input().split()

A = int(N[0])
B = int(N[1])

lcm = int(A * B / gcd(A, B))

print(lcm)
def main():
    n,m = map(int,input().split())
    a = sorted(list(map(int,input().split())),reverse=True)     
    s = sum(a)
    thresh = s/4/m
    if a[m-1]>=thresh:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

### FIXED CODE ###

n,k = map(int,input().split())
def main():
    m = n%k
    print(min(m,k-m))

if __name__ == "__main__":
    main()
import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)
from scipy.spatial import distance


def main():
    N = int(input())
    xy = [list(map(int,input().split())) for i in range(N)]

    xy = np.array(xy)
    # print(xy)

    md = distance.cdist(xy, xy, metric='minkowski', p=1)
    res = md.max()
    res = int(res)

    # print(diffs)
    # print(md)

    print(res)



main()


### FIXED CODE ###

import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


def main():
    N = int(input())
    xy = [list(map(int,input().split())) for i in range(N)]

    z_max = 0
    z_min = 2 * 10 **9

    w_max = - 10 ** 9
    w_min = 10 ** 9

    for i in range(N):
        z = xy[i][0] + xy[i][1]
        w = xy[i][0] - xy[i][1]
        z_max = max(z_max,z)
        z_min = min(z_min,z)
        w_max = max(w_max,w)
        w_min = min(w_min,w)

    res = max(z_max-z_min,w_max-w_min)

    print(res)



main()
l = list(map(int, input().split()))

for i in range(5):
  if l[i] == 0
    print(i + 1)

### FIXED CODE ###

l = list(map(int, input().split()))
     
for i in range(5):
  if l[i] == 0:
    print(i + 1)
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


city_num, start_pos = list(map(int, input().split()))
city_list = list(map(int, input().split()))

# スタート位置を入れて
city_list.append(start_pos)
# 昇順に並び替え
city_list.sort()

# city毎の距離のリストを生成する
distance_list = [city_list[i+1] - city_list[i] for i in range(city_num)]

# 距離が一つならそれを出力
if len(distance_list) == 1:
    print(distance_list[0])
    exit()

# 昇順に並び替え
distance_list.sort()

# 最大公約数を求める
max_gcd = gcd(distance_list[0], distance_list[1])
for i in range(2, len(distance_list)):
    max_gcd = gcd(max_gcd, distance_list[i])

# 出力
print(max_gcd)


### FIXED CODE ###

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

if a == 2 or b == 2:
    print("No")
else:
    print("Yes")
def main():
  s = ''.join(reversed(input()))
  multiplier = 1
  divisor = 10 ** 9 + 7
  list10 = list(range(10))
  list13 = list(range(13))
  p = [0 for i in list13]
  np = [0 for i in list13]
  rt = [i % 13 for i in range(100)]
  if s[0] != '?':
    p[int(s[0])] = 1
  else:
    for j in range(10):
      p[j] = 1
  for i in range(1, len(s)):
    multiplier = (10 * multiplier) % 13
    if s[i] != '?':
      r = int(s[i]) * multiplier
      for j in list13:
        np[(j + r) % 13] = p[j]
    else:
      for j in range(10):
        r = multiplier * j % 13
        for k in list13:
          np[re[k + r]] += p[k]
    for j in list13:
      p[j] = np[j] % divisor
      np[j] = 0
  print(p[5] % divisor)
main()

### FIXED CODE ###

s = ''.join(reversed(input()))
multiplier = 1
divisor = 10 ** 9 + 7
p = [0 for i in range(13)]
if s[0] != '?':
  p[int(s[0])] = 1
else:
  for j in range(10):
    p[j] = 1
for i in range(1, len(s)):
  multiplier = (10 * multiplier) % 13
  np = [0 for j in range(13)]
  if s[i] != '?':
    r = int(s[i]) * multiplier
    for j in range(13):
      np[(j + r) % 13] = p[j]
  else:
    for j in range(10):
      r = j * multiplier
      for k in range(13):
        np[(k + r) % 13] += p[k]
  for j in range(13):
    p[j] = np[j] % divisor
print(p[5] % divisor)
n,m=map(int,input().split())
for x in range(n+1):
    for y in range(n+1-x):
        if 10000*x+5000*y+1000*(n-x-y)==m and x+y+(n-x-y)==n:
            print(x,y,(n-x-y))
            exit()
print('-1 -1 -1')

### FIXED CODE ###

_,b,c=map(str,input().split("/"))
print("2018/"+b+"/"+c)
import sys
readline = sys.stdin.readline
 
N, K = map(int, readline.split())
A = list(map(int, readline().split()))
 
l = 0, r = 10**10
 
def test(m):
  return sum((a + m - 1) // m for a in A) <= K

while l + 1 < r:
  m = (l + r) // 2
  if test(m):
  	r = m
  else:
    l = m
print(r)

### FIXED CODE ###

import sys
readline = sys.stdin.readline
 
N, K = map(int, readline().split())
A = list(map(int, readline().split()))
 
l = 0
r = 10**10
 
def test(m):
  return sum((a + m - 1) // m for a in A) - N <= K

while l + 1 < r:
  m = (l + r) // 2
  if test(m):
  	r = m
  else:
    l = m
print(r)
N = int(input())
X_bin = input()
#N = 10**5
#X_bin = '1' * N

X_int = int(X_bin, 2)  # bin => int


def calc_bin_cnt(next_int):
    if next_int == 0:
        return 0
    next_bin = bin(next_int)[2:]
    # popcount
    cnt = 0
    for i in next_bin:
        if i == '1':
            cnt += 1
    return cnt


def calc_ans(next_int, cnt=None):
    if next_int == 0:
        return 1
    if cnt is None:
        cnt = calc_bin_cnt(next_int)
    next_int = next_int % cnt
    if next_int > 0:
        ans = calc_ans(next_int) + 1
    else:
        ans = 1
    return ans


X_cnt = calc_bin_cnt(X_int)
f_p = X_int % (X_cnt+1)
if X_cnt-1 == 0:
    f_m = 0
else:
    f_m = X_int % (X_cnt-1)
for i in range(N):
    if X_bin[i] == '1':
        next_int = f_m - (2**(N-i-1))  # マイナスでも正しく求まる？
        next_cnt = X_cnt - 1
    else:
        next_int = f_p + (2**(N-i-1))
        next_cnt = X_cnt + 1
    print(calc_ans(next_int, next_cnt))
    #calc_ans(next_cnt, next_cnt)


### FIXED CODE ###

N = int(input())
X_bin = input()
#N = 10**5
#X_bin = '1' * N

X_int = int(X_bin, 2)  # bin => int


def calc_bin_cnt(next_int):
    if next_int == 0:
        return 0
    next_bin = bin(next_int)[2:]
    # popcount
    cnt = 0
    for i in next_bin:
        if i == '1':
            cnt += 1
    return cnt


def calc_ans(next_int, cnt=None):
    if next_cnt == 0:
        return 0
    if next_int == 0:
        return 1
    if cnt is None:
        cnt = calc_bin_cnt(next_int)
    next_int = next_int % cnt
    if next_int > 0:
        ans = calc_ans(next_int) + 1
    else:
        ans = 1
    return ans


X_cnt = calc_bin_cnt(X_int)
f_p = X_int % (X_cnt+1)
if X_cnt-1 == 0:
    f_m = 0
else:
    f_m = X_int % (X_cnt-1)
for i in range(N):
    if X_bin[i] == '1':
        next_cnt = X_cnt - 1
        if next_cnt == 0:
            next_int = 0
        else:
            next_int = f_m - pow(2, (N-i-1), next_cnt)  # マイナスでも正しく求まる？
    else:
        next_cnt = X_cnt + 1
        next_int = f_p + pow(2, (N-i-1), next_cnt)
    print(calc_ans(next_int, next_cnt))
    #calc_ans(next_cnt, next_cnt)
#ABC075B

h,w=map(int,raw_input().split())
l=[]
for i in xrange(h):
 l.append(list(raw_input()))
for y in xrange(h):
 for x in xrange(w):
  if l[y][x]=='#':
   continue
  cnt=0
  for dy in [-1,0,1]:
   for dx in [-1,0,1]:
    ny=y+dy
    nx=x+dx
    if 0<=ny<h and 0<=nx<w:
     if l[ny][nx]=='#':
      cnt+=1
  l[y][x]=str(cnt)
for i in xrange(h):
 print ''.join(l[i])


### FIXED CODE ###

#ABC075A

a,b,c=map(int,raw_input().split())
if a==b:
 print c
elif a==c:
 print b
else:
 print a
# import time


w, h = map(int, raw_input().split())
p = []
q = []
for i in xrange(w):
    p.append(raw_input())
p = map(int, p)
for i in xrange(h):
    q.append(raw_input())
q = map(int, q)
start = time.time()

wl = w
hl = h

cost = 0

p.sort()
q.sort()

p.append(10 ** 8)
q.append(10 ** 8)

pc = 0
qc = 0

while(wl + hl - pc - qc> 0):
    if p[pc] < q[qc]:
        cost += (hl - qc + 1) * p[pc]
        pc += 1
    else:
        cost += (wl - pc + 1) * q[qc]
        qc += 1

print cost

# print time.time() - start        


### FIXED CODE ###

w, h = map(int, raw_input().split())
p = []
q = []
for i in xrange(w):
    p.append(int(raw_input()))
for i in xrange(h):
    q.append(int(raw_input()))

wl = w
hl = h

cost = 0

p.sort()
q.sort()

p.append(10 ** 8 + 1)
q.append(10 ** 8 + 1)

pc = 0
qc = 0

while(wl + hl - pc - qc> 0):
    if p[pc] < q[qc]:
        cost += (hl - qc + 1) * p[pc]
        pc += 1
    else:
        cost += (wl - pc + 1) * q[qc]
        qc += 1

print cost
a, b = map(int, input().split(" "))
print((a-1)*(b-i))

### FIXED CODE ###

a, b = map(int, input().split(" "))
print((a-1)*(b-1))
n=int(input())
a=list(map(int,input().split()))

ans=1

for i in a:
  ans*=i


  if ans>10**18:
    print(-1)
    else:
      print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))

ans=1

if 0 in a:
    print(0)
    exit()

for i in a:
   ans*=i
   if ans>10**18:
    print(-1)
    exit()


print(ans)
num = []
while True:
    l = map(int, raw_input().split())
    if l[0] == l[1] == l[2] == -1:
        break
    sum = l[0] + l[1]
    if sum >= 80:
        num.append("A")
    elif sum >= 65:
	num.append("B")
    elif sum >= 50:
	num.append("C")
    elif sum >= 30:
        if l[2] >= 50:
	num.append("C")
        else :
	num.append("D")
    else
	num.append("F")

for i in range(len(num)):
    print num[i]

### FIXED CODE ###

num = []
while True:
    l = map(int, raw_input().split())
    if l[0] == l[1] == l[2] == -1:
        break
    if l[0]*l[1] < 0:
        num.append("F")
    else:
        sum = l[0] + l[1]
        if sum >= 80:
            num.append("A")
        elif sum >= 65:
            num.append("B")
        elif sum >= 50:
            num.append("C")
        elif sum >= 30:
            if l[2] >= 50:
                num.append("C")
            else:
                num.append("D")
        else:
            num.append("F")

for i in range(len(num)):
    print num[i]
MOD = 10 ** 9 + 7

def main():
    n, m = [int(s) for s in input().split()]
    print(solve(m, n))

def solve(m, n):
    factors = list(get_prime_factors(m))
    h = max(c for f, c in factors)

    table = dict()
    table[1] = [1 for _ in range(h + 1)]

    i = 1
    while i < n:
        j = n & (i - 1)
        table[i * 2] = [0 for _ in range(h + 1)]
        if j != 0:
            table[i + j] = [0 for _ in range(h + 1)]
        for x in range(h + 1):
            for y in range(h + 1 - x):
                table[i * 2][x + y] = (table[i * 2][x + y] + table[i][x] * table[i][y]) % MOD
                if j != 0:
                    table[i + j][x + y] = (table[i + j][x + y] + table[i][x] * table[j][y]) % MOD
        i *= 2

    ans = 1
    for f, c in factors:
        ans = ans * table[n][c] % MOD
    return ans

def get_prime_factors(n):
    import itertools

    m = n
    for i in itertools.count(2):
        if i * i > m:
            break

        c = 0
        while True:
            x, y = divmod(m, i)
            if y != 0:
                break
            c += 1
            m = x
        if c != 0:
            yield i, c

    if m != 1:
        yield m, 1


main()


### FIXED CODE ###

import sys

MOD = 10 ** 9 + 7

def main():
    n, m = [int(s) for s in input().split()]
    print(solve(m, n))

def solve(m, n):
    factors = list(get_prime_factors(m))
    h = max((c for f, c in factors), default=0)

    table = dict()
    table[1] = [1 for _ in range(h + 1)]

    i = 1
    while i < n:
        j = n & (i - 1)
        table[i * 2] = [0 for _ in range(h + 1)]
        if n & i != 0 and j != 0:
            table[i + j] = [0 for _ in range(h + 1)]
        for x in range(h + 1):
            for y in range(h + 1 - x):
                table[i * 2][x + y] = (table[i * 2][x + y] + table[i][x] * table[i][y]) % MOD
                if n & i != 0 and j != 0:
                    table[i + j][x + y] = (table[i + j][x + y] + table[i][x] * table[j][y]) % MOD

        if n & i == 0:
            del table[i]
        if n & i != 0 and j != 0:
            del table[i]
            del table[j]

        i *= 2

    ans = 1
    for f, c in factors:
        ans = ans * table[n][c] % MOD
    return ans

def get_prime_factors(n):
    import itertools

    m = n
    for i in itertools.count(2):
        if i * i > m:
            break

        c = 0
        while True:
            x, y = divmod(m, i)
            if y != 0:
                break
            c += 1
            m = x
        if c != 0:
            yield i, c

    if m != 1:
        yield m, 1


main()
h,w = map(int, input().split())

if h ==1 or w==1 :
    print(0)
elif h * w %2 ==0:
    print(h*w//2)
else:
    print(h*w//2 +1)


### FIXED CODE ###

i=[ 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

K= int(input())
print(i[K-1])
N = int(input())
s = list(map(int, input().split()))
a=[0]*N#N個の要素の配列
total=0

for i in range(N):
 a[i]=int(s[i])

while 1==1:
 b=0
 for i in range(N):
  if a[i]%2==0:
        a[i]=a[i]/2
        b+=1
 if b==N:
  total+=1
 else: 
  break

print(total)

### FIXED CODE ###


s=list(input().split())
total=0

for digit in str(s):
 if digit=='1':
        total += 1

print(total)
a, b = map(int, input())
s = input()
if s[a] == "-" and s.count("-") == 1:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a, b = map(int, input().split())
s = input()
if s[a] != "-":
  print("No")
  quit()
for i in range(a+b+1):
  if i < a:
    if s[i] == "-":
      print("No")
      quit()
  if a < i:
    if s[i] == "-":
      print("No")
      quit()
print("Yes")
N = int(input())
A = list(map(int, input().split()))
s = sum(A)
A = A*2

ans = []
for i in range(2):
    ans.append(str(s - sum(A[i+1:N+i-1:2])*2 ))
for i in range(2,N):
    ans.append(str(int(ans[i-2])+(A[i-11]-A[N+i-2])*2))

ans = ' '.join(ans)
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
s = sum(A)
A = A*2

ans = []
for i in range(2):
    ans.append(str(s - sum(A[i+1:N+i-1:2])*2 ))
for i in range(2,N):
    ans.append(str(int(ans[i-2])+(A[i-1]-A[N+i-2])*2))

ans = ' '.join(ans)
print(ans)
import sys
#import bisect
#from collections import deque
import math

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


X,Y = list(map(int, input().split()))

if (2*X-Y) % 3:
    print(0)
    sys.exit()

if (2*Y-X) % 3:
    print(0)
    sys.exit()

M = max((2*X-Y)//3, (2*Y-X)//3)
N = min((2*X-Y)//3, (2*Y-X)//3)

from scipy.special import comb
#print(comb(M+N,N) % (pow(10,9) + 7))
print(comb(M+N,N, exact=True)% (pow(10,9) + 7))


### FIXED CODE ###

import sys
#import bisect
#from collections import deque
import math

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


X,Y = list(map(int, input().split()))

if (2*X-Y) % 3:
    print(0)
    sys.exit()

if (2*Y-X) % 3:
    print(0)
    sys.exit()

M = max((2*X-Y)//3, (2*Y-X)//3)
N = min((2*X-Y)//3, (2*Y-X)//3)

if M<0 or N<0:
    print(0)
    sys.exit()
    
mod = pow(10,9) + 7

#from scipy.special import comb
#print(comb(M+N,N) % (pow(10,9) + 7))
#print(comb(M+N,N, exact=True)% (pow(10,9) + 7))  causes "RE" at atcoder
#from math import factorial
#print((factorial(M+N)//factorial(M)//factorial(N)))

def framod(n, mod, a=1):
    for i in range(1,n+1):
        a=a * i % mod
    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def ohmycomb(n, k, mod):
    a=framod(n, mod)
    b=framod(k, mod)
    c=framod(n-k, mod)
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod

print(ohmycomb(M+N, N, mod))
a,b=input().split()
if a>=9:
  print('')
elif b>=9:
  print(':(')
else:
  print('Yay!')

### FIXED CODE ###

a,b=(int(x) for x in input().split())
if a>=9:
  print(':(')
elif b>=9:
  #ここ↑のイコールを忘れてた
  print(':(')
else:
  print('Yay!')