Harryxun/stf_run huggingface dataset:
n=int(input())
a=list(map(int,input().split()))

ans=1000
kabu=0
flag=0

for i in range(n-1):
    if a[i]<a[i+1]:
        if flag <=0:
            kabu=int(ans/a[i])
            ans-=(kabu*a[i])
            #print(a[i],ans,kabu)
        flag=1
    elif a[i]>a[i+1]:
        if flag >0:
            ans+=(kabu*a[i])
            #print(ans)
        flag=-1
    else:
        if flag>0:
            flag=2
        else:
            flag=-2
    if i==(n-2) and flag>0:
        ans+=(kabu*a[i+1])
        #print(a[i+1],ans)

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

ans=1000
kabu=0
flag=0

for i in range(n-1):
    if a[i]<a[i+1]:
        if flag <=0:
            kabu=int(ans/a[i])
            ans-=(kabu*a[i])
            #print(a[i],ans,kabu)
        flag=1
    elif a[i]>a[i+1]:
        if flag >0:
            ans+=(kabu*a[i])
            #print(ans)
        flag=-1
    else:
        if flag>0:
            flag=2
        else:
            flag=-2
    if i==(n-2) and flag>0:
        ans+=(kabu*a[i+1])
        #print(a[i+1],ans)

print(ans)

### FIXED CODE ###

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

ans=1000
kabu=0
flag=0

for i in range(n-1):
    if a[i]<a[i+1]:
        if flag <=0:
            kabu=int(ans/a[i])
            ans-=(kabu*a[i])
            #print(a[i],ans,kabu)
        flag=1
    elif a[i]>a[i+1]:
        if flag >0:
            ans+=(kabu*a[i])
            #print(ans)
        flag=-1
    else:
        if flag>0:
            flag=2
        else:
            flag=-2
    if i==(n-2) and flag>0:
        ans+=(kabu*a[i+1])
        #print(a[i+1],ans)

print(ans)
a, b, c = map(int, input().split())
ans = 'NO'
if b - a == c = b:
  ans = 'YES'
print(ans)

### FIXED CODE ###

a, b, c = map(int, input().split())
ans = 'NO'
if b - a == c - b:
  ans = 'YES'
print(ans)
W, H, x, y = map(int, input().split())
S = W*H*0.5
cond = 1 if (W//x==2)&(H//y==2) else 0
print(S, cond)

### FIXED CODE ###

W, H, x, y = map(int, input().split())
S = W*H*0.5
cond = 1 if (W/2==x)&(H/2==y) else 0
print(S, cond)
import sys
tmp=sys.stdin.readline()
def main():
   cnt=[0]*2019
   cnt[0]+=1
   for i in reversed(range(len(tmp))):
      cnt[int(tmp[i:])%2019] += 1
   import collections
   cnt=collections.Counter(cnt).items()
   ans=0
   for i,j in cnt:
      if i > 1:
         ans+=i*(i-1)//2*j
   print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
tmp=sys.stdin.readline().rstrip()
def main():
   ans=0
   cnt=[0]*2019
   cnt[0]+=1
   t=0
   d=1
   for i in reversed(tmp):
      t=(t+int(i)*d)%2019
      cnt[t]+=1
      d=d*10%2019
   for i in cnt:
      ans+=i*(i-1)//2
   print(ans)
if __name__ == "__main__":
    main()
def main():
	w,h,x,y = map(int,input().split())

	if w % 2 != 0 or h % 2 != 0 or x == 0 or y == 0:
		ans_2 = 0
	if w % 2 == 0 and h % 2 == 0 and w // 2 == x and h // 2 == y:
		ans_2 = 1

	ans_1 = (w*h) /2

	print(ans_1, ans_2)



if __name__ == '__main__':
	main()

### FIXED CODE ###

def main():
	w,h,x,y = map(int,input().split())

	ans_2 = 0
	
	if w % 2 != 0 or h % 2 != 0:
		ans_2 = 0
	elif w % 2 == 0 and h % 2 == 0 and w / 2 == x and h / 2 == y:
		ans_2 = 1

	ans_1 = (w*h) /2

	print(ans_1, ans_2)

if __name__ == '__main__':
	main()
import itertools


def resolve():
    n, m = map(int, input().split())
    S = [[0] * m for i in range(m)]
    MOD = (10 ** 9) + 7

    for i in range(m):
        a, b = map(int, input().split())
        S[a - 1][b - 1] = 1
        S[b - 1][a - 1] = 1

    ans = 0
    for p in itertools.permutations(range(m)):
        if p == (0, 2, 3, 4, 5, 6, 1):
            pass
        if p[0] != 0:
            break;
        tmp = 1
        for i, v in enumerate(p):
            if i + 1 < m:
                tmp *= S[v][p[i + 1]]
            if tmp == 0:
                break;
        ans += tmp

    print(ans % MOD)


if __name__ == '__main__':
    resolve()

### FIXED CODE ###

# サンプルコード計算量お試し

import itertools

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

for i in range(M):
    a, b = map(int, input().split())
    adj_matrix[a-1][b-1] = 1
    adj_matrix[b-1][a-1] = 1

cnt = 0

for each in itertools.permutations(range(N)):
    if each[0] != 0:
        break
    factor = 1
    for i in range(N-1):
        factor *= adj_matrix[each[i]][each[i+1]]
    cnt += factor

print(cnt)
a, b = map(str, input().split())
res = int(a+b)
ans = "No"
for i in range(res**0.5):
    if i**2 == res:
        ans = "Yes"
        break
print(ans)

### FIXED CODE ###

a, b = map(str, input().split())
res = int(a+b)
ans = "No"
for i in range(int(res**0.5)+1):
    if i**2 == res:
        ans = "Yes"
        break
print(ans)
#/usr/bin/env python3
# -*- coding: utf-8 -*-
# D-Grid and Integers

from collections import defaultdict

def readInput():
	return [int(i) for i in input().split(" ")]

(R, C) = readInput()
N = int(input())
rowIdx = list() 
colIdx = list()
grid = defaultdict(lambda:None)
rowGrid = defaultdict(list)
colGrid = defaultdict(list)
for i in range(N):
	(r, c, a) = readInput()
	r -= 1
	c -= 1
	rowGrid[r].append(c)
	colGrid[c].append(r)
	grid[(r, c)] = a 
	rowIdx.append(r)
	colIdx.append(c)

pairIdx = rowIdx.copy()	
for i in rowIdx:
	pairIdx.remove(i)
	for j in pairIdx:
		tempRow = set(rowGrid[i])
		tempPair = set(rowGrid[j])
		intersect = tempRow.intersection(tempPair)
		if (len(intersect) == 0):
			continue
		col = list(intersect)[0]
		diff = grid[(i, col)] - grid[(j, col)] 
		for m in tempRow:
			anchor = grid[(i, m)]
			anchorP = grid[(j, m)]
			if (anchorP == None and anchor < diff):
				print('No')
				exit()
			elif (anchorP != None and anchor - anchorP != diff):
				print('No')
				exit()
		for n in tempPair:
			anchor = grid[(j, n)]
			anchorP = grid[(i, n)]
			if (anchorP == None and anchor < -diff):
				print('No')
				exit()
print('Yes')

### FIXED CODE ###

#A-Codefestival 2016
str=input()
str1=str[:4]+" "+str[4:]
print(str1)
import math

N, X = map(int, input().split())

ans = 0


x = list(map(int, input().split()))
x.append(X)
x.sort()
a = []

for i in range(N):
    a.append(abs(x[i] - x[i+1]))
    ans = math.gcd(ans, a[i])


print(ans)



### FIXED CODE ###

a,b = map(int, input().split())
if a%2 == 1 and b%2 == 1:
    print("Yes")
else:
    print("No")
from collections import defaultdict

d = defaultdict([])
goal, n = map(int, input().split())
for _ in range(n):
  f, t = map(int, input().split())
  d[f].append(t)
  d[t].append(f)
for current in d[1]:
  if goal in d[current]:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")

### FIXED CODE ###

from collections import defaultdict

d = defaultdict(list)
goal, n = map(int, input().split())
for _ in range(n):
  f, t = map(int, input().split())
  d[f].append(t)
  d[t].append(f)
for current in d[1]:
  if goal in d[current]:
    print("POSSIBLE")
    break
else:
  print("IMPOSSIBLE")
A,B=map(int,input().split())
C=input()
print(C[:B]+C[B].lower()+C[B+1:])

### FIXED CODE ###

A,B=map(int,input().split())
C=input()
print(C[:B-1]+C[B-1].lower()+C[B:])
n, r = map(itn, input().split())

if n >= 10:
  print(r)
else:
  print(r + 100 * (10 - n))

### FIXED CODE ###

n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    print(r + 100*(10-n))
n,m=map(int,input().split())
s=[0]*m
c=[0]*m
t=[]
for i in range(m):
    s[i], c[i]=map(int,input().split())
for i in range(n):
    t.append("0")
for i in range(m):
    t[s[i]-1]=str(c[i])
for i in reversed(range(m)):
    if t[s[i]-1]!=str(c[i]):
        print(-1)
        break
    elif ''.join(t)=="000":
        print(-1)
        break
    elif i==0 and t[0]="0":
        t[0]="1"
        print(''.join(t))
        break
    elif i==0:
        print(''.join(t))

### FIXED CODE ###

n,m=map(int,input().split())
sc=[list(map(int,input().split())) for i in range(m)]

for i in range(10**n):
  i2=str(i)
  if len(i2)==n and all([i2[s-1]==str(c) for s,c in sc]):
      print(i2)
      exit()
print(-1)
def f(x):
    count_x = 1
    while x/10>=1:
        x = x//10
        count_x += 1
    return count_x

pf = {}
m = int(input())
root_m = int(m**0.5)
for i in range(2,root_m+1):
    while m%i == 0:
        pf[i] = pf.get(i,0) + 1
        m//=i
if m>1:pf[m]=1

if root_m<max(pf.keys()):
    print(f(max(pf.keys())))
else:
    print(f(root_m))

### FIXED CODE ###

def f(x,y):
    count_x, count_y = 1, 1
    while x/10>=1:
        x = x//10
        count_x += 1
    while y/10>=1:
        y = y//10
        count_y += 1
    return max(count_x, count_y)

pf = []
m = int(input())

for i in range(1,int(m**0.5)+1):
    if m%i == 0:
        pf.append(i)

print(f(pf[-1], m/pf[-1]))
a=int(input())
b=list(map(int,input().split())
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")

### FIXED CODE ###

a=int(input())
b=list(map(int,input().split()))
if sum(b)>2*max(b):
       print("Yes")
else:
       print("No")
n = int(input())
q = []
bottom = 0
for i in range(n):
    cmd = input()
    if cmd[0] == 'i':
        q.append(cmd[7:])
    elif cmd[6] == ' ':
        try:
            q.pop(~q[::-1].index(cmd[7:]))
        except:
            pass
    elif cmd[6] == 'F':
        q.pop()
    else:
        bottom += 1
 
print ' '.join(q[bottom:][::-1])

### FIXED CODE ###

import sys
from collections import deque

n = int(sys.stdin.readline())
q = deque()
for i in range(n):
    cmd = sys.stdin.readline()[:-1]
    if cmd[0] == 'i':
        q.appendleft(cmd[7:])
    elif cmd[6] == ' ':
        try:
            q.remove(cmd[7:])
        except:
            pass
    elif cmd[6] == 'F':
        q.popleft()
    else:
        q.pop()

print(' '.join(q))
def gcd(x, y):
	if y == 0:
		return x
	else:
		return gcd(y, x % y)

N = int(input())
A = list(map(int, input().split()))
#N = 3
#A = [3,4,6]

t = A[0]
for i in range(1,N):
	t = t * A[i] / gcd(t, A[i])
sum = 0
t -= 1
#print(t)
for i in range(N):
	sum += t % A[i]
print(sum)


### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
print(sum(A)-N)
import numpy as np
 
mod = 10**9 + 7
N = input()
A = np.array(list(map(int, input().split())))
A = np.atleast_2d(A)

print((np.sum((A ^ A.T) % mod) % mod) // 2)

### FIXED CODE ###

import numpy as np
 
mod = 10**9 + 7
max_digit = 60
N = int(input())
A = np.array(list(map(int, input().split())))

result = 0
base = 1
for _ in range(max_digit + 1):
  a = A % 2
  c = np.count_nonzero(a == 0)
  result = (result + (base*(N - c)*c) % mod) % mod
  A = A >> 1
  base *= 2

print(result)
N, M = map(int, input().split())

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

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

ans = [-1] * N
visited = [0] * N

from collections import deque
queue = deque()

def bfs():
    queue.append(0)
    while len(queue) > 0:

        #if all(visited):
            #break
        now = queue.popleft()

        for c in nei_L[now]:

            if not visited[c]:
                ans[c] = now
                queue.append(c)
                visited[c] = 1

bfs()

#if -1 in visited[1:]:
#    print("No")
#else:
for i in range(N):
    if i == 0:
        print("Yes")
    else:
        print(ans[i] + 1)

### FIXED CODE ###

from collections import deque

N, M = map(int, input().split())

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

ans = [-1] * N
queue = deque()


def bfs():
    queue.append(0)
    while queue:
        now = queue.popleft()

        for c in nei_L[now]:
            if ans[c] == -1:
                ans[c] = now
                queue.append(c)


bfs()

if -1 in ans[1:]:
    print("No")
else:
    print("Yes")
    for i in range(1, N):
        print(ans[i] + 1)
n = int(input())
s = [{0} for i in range(n)]

ans = [0] * n
a = 0
b = 0
sp = {i for i in range(n)}
for i in range(1,n):
    a,b = list(map(int,input().split()))
    ans[i] = min(sp-(s[a-1]|s[b-1]))

    s[a-1].add(ans[i])
    s[b-1].add(ans[i])

print(max(ans))
for i in range(1,n):
    print(ans[i])
    
    
   





### FIXED CODE ###

S = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
s = input()
print(7 - S.index(s))
A, B = int, input().split()
list = []
list.append(A + B)
list.append(A - B)
list.append(A * B)
print(max(list))

### FIXED CODE ###

A, B = map(int, input().split())
list = []
list.append(A + B)
list.append(A - B)
list.append(A * B)
print(max(list))
from collections import defaultdict



n, m = map(int, input().split())
p = list(map(int, input().split()))

def dp(start, to, used):
    if start == to:
        return True
    if start in x_y:
        is_ok = False
        for next_start in x_y[start]:
            if not next_start in used:
                #remove used
                used.append(next_start)
                if dp(next_start, to, used):
                    return True
        return is_ok

    else:
        return False




x_y = defaultdict(lambda:set())
for _ in range(m):
    x, y = map(int, input().split())
    x_y[x].add(y)
    x_y[y].add(x)


count = 0
for index in range(len(p)):
    start = index + 1
    to = p[index]
    used = []
    if dp(start, to, used):
        # 交換可能
        p[start-1] ,p[to -1] = p[to -1] ,p[start -1] 
        count += 1
print(count)


### FIXED CODE ###


class UnionFind():
    def __init__(self, n):
        self.par = []
        for i in range(n+1):
            self.par.append(i)

    def find(self, x):
        if(self.par[x] == x):
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def same(self,x, y):
        return self.find(x) == self.find(y)

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if(x == y) :
            return
        self.par[x] = y




n, m = map(int, input().split())
p = list(map(int, input().split()))

uf = UnionFind(n);

for _ in range(m):
    x, y = map(int, input().split())
    uf.union(x, y)


count = 0
for index in range(n):
    start = index + 1
    to = p[index]
    if uf.same(start, to):
        count += 1
print(count)
A = list(input())
T = str(input())

check = 'No'


for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(A.pop(-1))

print(check)

### FIXED CODE ###

A = list(input())
T = str(input())

check = 'No'

for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(0, A.pop(-1))

print(check)
a,b,x = map(int,input().split())

#if a > x or b < x:
#    print("0")
elif a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)




### FIXED CODE ###

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

print(a[0]+b[0]+c[0])
n,l = map(int,input().split())
    if l > 0:
        print(int(n*(l-1)+n*(n+1)/2-l))
    elif l <= 0 and l +n-1 >=0:
        print(int(n*(l-1)+n*(n+1)/2))
    else:
        print(int(n*(l-1)+n*(n+1)/2-l-n+1))

### FIXED CODE ###

def solve():
    n,l = map(int,input().split())
    if l > 0:
        print(int(n*(l-1)+n*(n+1)/2-l))
    elif l <= 0 and l +n-1 >=0:
        print(int(n*(l-1)+n*(n+1)/2))
    else:
        print(int(n*(l-1)+n*(n+1)/2-l-n+1))
    return 0

solve()
def main():
    N = int(input())
    L = list(map(int, input().split()))
    L = sorted(L)
    print(L)
    count = 0

    for i in range(N-2):
        for j in range(i+1, N):
            for k in range(j+1, N):
                if L[i] + L[j] > L[k] and L[i] != L[j] != L[k]:
                    print(i,j,k)
                    count += 1
                    print(count)

    print(count)

if __name__ == '__main__':
    

### FIXED CODE ###

def main():
    N = int(input())
    L = list(map(int, input().split()))
    L = sorted(L)
    count = 0

    for i in range(N-2):
        for j in range(i+1, N):
            for k in range(j+1, N):
                if L[i] + L[j] > L[k] and L[i] != L[j] != L[k]:
                    count += 1

    print(count)


if __name__ == '__main__':
    main()
if __name__ == "__main__":
    main()


def main():
    x = int(input())
    if x:
        print(0)
    else:
        print(1)


### FIXED CODE ###

x = int(input())
if x:
    print(0)
else:
    print(1)
a,b=list(map(int,input().split()))
if a>b:
  print("Alice")
elif a=b:
  print("Draw")
else:
  print("Bob")

### FIXED CODE ###

a,b=list(map(int,input().split()))
if a == 1:
  a += 13
if b == 1:
  b += 13

if a > b:
  print("Alice")
elif a==b:
  print("Draw")
else:
  print("Bob")
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    n, q = map(int, readline().split())
    s = readline().rstrip().decode()
    ac = []    
    cnt = 0
    for i in range(n+1):
        if (s[i-1] == 'A') and (s[i] == 'C'):
            cnt += 1
            ac.append(cnt)
        else:
            ac.append(cnt)
    query = []
    for _ in range(q):
        l, r = map(int, readline().split())
        l -= 1
        r -= 1
        print(ac[r]-ac[l])
if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    n, q = map(int, readline().split())
    s = readline().rstrip().decode()
    ac = [0]    
    cnt = 0
    for i in range(1, n):
        if (s[i-1] == 'A') and (s[i] == 'C'):
            cnt += 1
            ac.append(cnt)
        else:
            ac.append(cnt)
    query = []
    for _ in range(q):
        l, r = map(int, readline().split())
        l -= 1
        r -= 1
        print(ac[r]-ac[l])
if __name__ == '__main__':
    main()
print(float(2*r*3.14))

### FIXED CODE ###

r = int(input())
print(float(2*r*3.14))
n=raw_input()
A=map(int,raw_input.split())
q=raw_input()
m=map(int,raw_input.split())

def solve(c, m):
  if m == 0:
    return 1
  if c >= n or sum(A)<m:
    return 0
  res = solve(c + 1, m) or solve(c + 1, m - A[c])
  return res

for i range(0,q):
  if solve(0,m[i])==1:
    print 'yes'
  else:
    print 'no'

### FIXED CODE ###

n=int(raw_input())
A=map(int, raw_input().split())
q=int(raw_input())
m=map(int, raw_input().split())

def solve(j, m):
  if m == 0:
    return 1
  if j >= n or m > sum(A):
    return 0
  res = solve(j + 1, m) or solve(j + 1, m - A[j])
  return res

for i in range(0,q):
  if solve(0,m[i]):
    print "yes"
  else:
    print "no"
Pat=[1]
for p in range(51):
    Pat.append(Pat[p]*2+1)
    
All=[1]
for a in range(51):
    All.append(All[a]*2+3)
    
N,X=map(int,input().split())
    
def saiki(n,x):
    if n==0:
        if x<=0:
            return 0
        else:
            return 1
    elif x<n:
        return 0
    elif x<(All[n]+1)//2-1:
        return saiki(n-1,x-1)
    elif x==(All[n-1]+2):
        return Pat[n-1]+1
    elif x<=All[n]:
        return Pat[n-1]+1+saiki(n-1,x-2-All[n-1])
    
print(saiki(N,X))



### FIXED CODE ###

Pat=[1]
All=[1]
for i in range(51):
    Pat.append(Pat[i]*2+1)
    All.append(All[i]*2+3)

N,X=map(int,input().split())

def saiki(N,X):
    if N==0:
        if X<=0:
            return 0
        else:
            return 1
    elif X<=All[N-1]+1:
        return saiki(N-1,X-1)
    elif X<=All[N]-1:
        return Pat[N-1]+1+saiki(N-1,X-2-All[N-1])
    else:
        return Pat[N]
        
print(saiki(N,X))
from math import floor

word = input()
num = int(input())
length=len(word)
charlist_size=num*length

string_generator=(word[i] for i in range(length))

char_before= ''
sum=0
subsum =0
count= 0
stack=[]

for index in range(length):
    char_now=next(string_generator)
    if index == 0 :
        char_before = char_now
        char_first=char_now
        count = 1
        continue
    
    if char_before == char_now :
        count = count + 1
    else:
        char_before = char_now
        stack.append(count)
        count = 1
    
    if index == length-1:
        char_last=char_now
        stack.append(count)
        
for i in stack:
    subsum= subsum + floor(i/2)
    
if (stack[0]%2)==1 and (stack[-1]%2)==1 and char_last==char_first and len(stack)>=2:
    sum =(subsum+1)*num -1
elif len(stack)==1:
    sum = floor(length*num/2)
else:
    sum =(subsum)*num

print(sum)

### FIXED CODE ###

from math import floor

word = input()
num = int(input())
length=len(word)

char_before= ''
sum=0
subsum =0
count= 0
stack=[]

for index in range(length):
    char_now=word[index]
    if index == 0 :
        char_before = char_now
        char_first=char_now
        count = 1
        if length==1:
            char_last=char_now
            stack.append(count)
        continue
    
    if char_before == char_now :
        count = count + 1
    else:
        char_before = char_now
        stack.append(count)
        count = 1
    
    if index == length-1:
        char_last=char_now
        stack.append(count)

for i in stack:
    subsum= subsum + floor(i/2)
    
if (stack[0]%2)==1 and (stack[-1]%2)==1 and char_last==char_first and len(stack)>=2:
    sum =(subsum+1)*num -1
elif len(stack)==1:
    sum = floor(length*num/2)
else:
    sum =(subsum)*num

print(sum)
# -*- coding: utf-8 -*-

import sys

def main():
    args = sys.argv
    a, b = int(args[1]) ,int(args[2])
    result = 'Even' if ( a * b ) % 2 == 0 else 'Odd'
    print(result)

if __name__ == '__main__':
    main()


### FIXED CODE ###

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

import sys

def main():
    args = input().split()
    a, b = int(args[0]) ,int(args[1])
    result = 'Even' if ( a * b ) % 2 == 0 else 'Odd'
    print(result)

if __name__ == '__main__':
    main()
# 042a

def atc_042a(input_value: str) -> str:
    ABC = input_value.split(" ")
    if ABC.count("5") == 2 and ABC.count("7") == 1:
        return "YES"
    return "NO"

Input_value_1 = input()
print(atc_042a(input_value_1))


### FIXED CODE ###

# 042a

def atc_042a(input_value: str) -> str:
    ABC = input_value.split(" ")
    if ABC.count("5") == 2 and ABC.count("7") == 1:
        return "YES"
    return "NO"

input_value_1 = input()
print(atc_042a(input_value_1))
a,b,c=map(int,input.split())
print(a*b//2)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(a*b//2)
import bisect

n = int(input())
s = input()
q = int(input())

alpha_map = {i:[] for i in alpha}
for i,c in enumerate(s):
    bisect.insort(alpha_map[c],i+1)
    
for _ in range(q):
    x,y,z = map(str,input().split())
    if int(x) == 1:
        y = int(y)
        bef = s[y-1]
        if bef == z:
            continue
        alpha_map[bef].pop(bisect.bisect_left(alpha_map[bef],y))
        bisect.insort(alpha_map[z],y)
        s = s[:y-1]+z+s[y:]
    else:
        count = 0
        for i,j in alpha_map.items():
            idx = bisect.bisect_left(j,int(y))
            if idx < len(j) and j[idx] <= int(z):
                    count += 1
        print(count)

### FIXED CODE ###

import bisect

n = int(input())
s = list(input())
q = int(input())

alpha_map = {chr(i):[] for i in range(97,123)}
for i,c in enumerate(s):
    bisect.insort(alpha_map[c],i+1)
    
for _ in range(q):
    x,y,z = map(str,input().split())
    if int(x) == 1:
        y = int(y)
        bef = s[y-1]
        if bef == z:
            continue
        alpha_map[bef].pop(bisect.bisect_left(alpha_map[bef],y))
        bisect.insort(alpha_map[z],y)
        s[y-1] = z
    else:
        count = 0
        for i,j in alpha_map.items():
            idx = bisect.bisect_left(j,int(y))
            if idx < len(j) and j[idx] <= int(z):
                    count += 1
        print(count)
def main():
    
    
    A, B = map(float,input().split())
    
    if A == 0:
        return 0

    else:
        AB = A*(B*100)
        
        if AB > 1e18:
            return -1
        
        else:
            return int(AB/100)
        
    
print(main())

### FIXED CODE ###


N = input()

N = list(N)

if N[len(N)-1] == '3':
    print('bon')

elif N[len(N)-1] == '0' or N[len(N)-1] == '1' or N[len(N)-1] == '6' or N[len(N)-1] == '8':
    print('pon')
    
else:
    print('hon')