Harryxun/stf_run huggingface dataset:
n, q = map(int, input().split())
s = str(input())
a = []
b = []
for i in range(q):
    x, y = map(int, input().split())
    a.append(x)
    b.append(y)

ss = []
ll = []
for i in range(n):
    c = s[a[i]:b[i]]
    d = c.count('AC')
    print(len(c)-len(d))

### FIXED CODE ###

n, q = map(int, input().split())
s = str(input())
d = [list(map(int, input().split())) for i in range(q)]
a = [0,0]
cnt = 0
for i in range(1, n):
    if s[i-1]+s[i] == 'AC':
        cnt += 1
    a.append(cnt)

for i in range(q):
    print(a[d[i][1]]-a[d[i][0]])
N = int(input())
A = list(map(int,input().split()))
ruiseki = [0]*(N+1)
total = 0
now = 10**9+7
sa = 0
now_2 = 0
for i in range(N):
  total += A[i]
  ruiseki[i+1] = total
for i in range(1,len(ruiseki)-1):
  snuke = ruiseki[i]-ruiseki[0]
  arai = ruiseki[N]-ruiseki[i]
  now_2 = abs(snuke-arai)
  now = min(now,now_2)
print(now)


### FIXED CODE ###

A,B = map(int,input().split())
if A%3 == 0:
  print("Possible")
elif B%3 == 0:
  print("Possible")
elif (A+B)%3 == 0:
  print("Possible")
else:
  print("Impossible")
if int(input())*int(input())%2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a,b = map(int,input().split())
if a*b%2 == 0:
    print("Even")
else:
    print("Odd")
ls = [int(input()) for i in range(5)]
ans = []
num = 0
minNum = 10
    
for j in ls:
    x = j % 10
    if x < minNum and x > 0:
        num = j
        minNum = x
ans.append(num)
ls.pop(ls.index(num))

for i in ls:
    y = ((i + 9) // 10) * 10
    ans.append(y)

print(sum(ans))

### FIXED CODE ###

n =  [int(input()) for x in range(5)]
minNum = 10
array = 0
for i in range(len(n)):
    num = n[i] % 10
    if((num <= minNum) and (num != 0)):
        minNum = num
        array = i
        
numList = []
a = n[array]
n[array] = 0

for x in n:
    k = ((x + 9) // 10) * 10
    numList.append(k)  
print(sum(numList) + a)
def dfs_recursive(u):
    global time
    color[u] = 'gray'
    arrive[u] = time
    time += 1
    for v in range(n):
        if adjMat[u][v] == 1 and color[v] == 'white':
            dfs_recursive(v)
    color[u] = 'black'
    finish[u] = time
    time += 1


n = int(input())

adjMat = [[0] * n for _ in range(n)]
color = ['white'] * n
arrive = [0] * n
finish = [0] * n
time = 1

for _ in range(n):
    adj = list(map(int, input().split()))
    i = adj[0]
    v = adj[2:]
    for j in v:
        adjMat[i - 1][j - 1] = 1

for root in range(n):
    if color[root] == 'white':
        dfs(root)


for i in range(n):
    out = ''
    out += '{} {} {}'.format(i + 1, arrive[i], finish[i])
    print(out)

### FIXED CODE ###

def dfs_recursive(u):
    global time
    color[u] = 'gray'
    arrive[u] = time
    time += 1
    for v in range(n):
        if adjMat[u][v] == 1 and color[v] == 'white':
            dfs_recursive(v)
    color[u] = 'black'
    finish[u] = time
    time += 1


n = int(input())

adjMat = [[0] * n for _ in range(n)]
color = ['white'] * n
arrive = [0] * n
finish = [0] * n
time = 1

for _ in range(n):
    adj = list(map(int, input().split()))
    i = adj[0]
    v = adj[2:]
    for j in v:
        adjMat[i - 1][j - 1] = 1

for root in range(n):
    if color[root] == 'white':
        dfs_recursive(root)


for i in range(n):
    out = ''
    out += '{} {} {}'.format(i + 1, arrive[i], finish[i])
    print(out)
N = int(input())
s, t = input().split()
 
ans = ''
i = j = 0
flag = True
while j < N:
    if flag:
	    ans += s[i]
        i += 1
    else:
        ans += t[j]
        j += 1
    flag = not flag

### FIXED CODE ###

n = int(input())
s, t = input().split()

ans = ''
i = 0
flag = True

while i < n:
  if flag:
    ans += s[i]
  else:
    ans += t[i]
    i += 1
  flag = not flag
else:
  print(ans)
from collections import deque as dq
# import itertools
# import math
import networkx as nx
import sys
input = sys.stdin.readline


def main():
    n, m = map(int, input().split())
    limit = 10 ** 5
    # lst = [[] for _ in range(n + 1)]
    # ans = [0] * (n + 1)
    que = dq()
    # for _ in range(m):
    #     a, b = map(int, input().split())
    #     lst[a].append(b)
    #     lst[b].append(a)

    g = nx.Graph()
    g.add_edges_from([[i for i in input().split()] for _ in range(m)])
    # [[g.nodes[i][length] = limit ] for i in range(2, n + 1)]
    g.nodes[1]['length'] = 0
    for i in range(2, n + 1):
        g.nodes[i]['length'] = limit
        g.nodes[i]['next'] = 'Non'

    # d = {i: limit + 1 for i in range(1, n + 1)}
    # d[1] = 0
    que.append(1)
    # cnt = 1
    while que:
        visit = que.popleft()
        for next_v in g.succ[visit]:
            if g[next_v]['length'] > g[visit]['length'] + 1:
                g[next_v]['length'] = g[visit]['length'] + 1
                que.append(next_v)
                g[next_v]['next'] = visit

    if all(g.nodes[i]['next'] != 'Non' for i in range(2, n + 1)):
        print('Yes')
        for i in range(2, n + 1):
            print(g.nodes[i]['next'])
    else:
        print('No')


if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import deque as dq
import sys
input = sys.stdin.readline


def main():
    n, m = map(int, input().split())
    lst = [[] for _ in range(n + 1)]
    ans = [0] * (n + 1)
    que = dq()
    for _ in range(m):
        a, b = map(int, input().split())
        lst[a].append(b)
        lst[b].append(a)

    limit = 10 ** 5
    d = {i: limit + 1 for i in range(1, n + 1)}
    d[1] = 0
    que.append(1)
    while que:
        visit = que.popleft()
        for next_v in lst[visit]:
            if d[next_v] > d[visit] + 1:
                d[next_v] = d[visit] + 1
                que.append(next_v)
                ans[next_v] = visit

    if all([i != 0 for i in ans[2:]]):
        print('Yes')
        print(*ans[2:], sep='\n')
    else:
        print('No')


if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))

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

ans = 1
for i in range(n):
    ans *= a[i]
    if ans > 1000000000000000000:
        print(-1)
        exit()

print(ans)


### FIXED CODE ###

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

print(a * b)
S = input()
T = input()

min = len(T)
for t in range(len(S) - len(T)+1):
    tmp = 0
    for i in range(len(T)):
        if S[i+t] != T[i]:
            tmp+=1
    
    if tmp < min:
        min = tmp

print(min)

### FIXED CODE ###

D,T,S = [int(i) for i in input().split(' ')]
 
if T*S >= D:
  print('Yes')
else:
  print('No')
def f(n):
    cnt = 1
    while n > 0:
        n  %= bin(n).count('1')
        cnt += 1
    return cnt

if __name__ == "__main__":
    n = int(input())
    x = input()
    print(x[2])
    d = x.count('1')
    if d == 1:
        for i in x[:-1]:
            if i == '0':
                print(1)
            else:
                print(0)
        if x[-1] == '1':
            print(0)
        else:
            print(2)
        exit()

    ans = []
    M = 0
    for i in x:
        M <<= 1
        if i == '1':
            M += 1
    p = M % (d + 1)
    m = M % (d - 1)
    for i in range(n):
        if x[i] == '0':
            ans.append(f((p + pow(2, n - i - 1, d + 1)) % (d + 1)))
        else:
            ans.append(f((m - pow(2, n - i - 1, d - 1)) % (d - 1)))
    print(*ans, sep='\n')


### FIXED CODE ###

def f(n):
    cnt = 1
    while n > 0:
        n  %= bin(n).count('1')
        cnt += 1
    return cnt

if __name__ == "__main__":
    n = int(input())
    x = input()
    d = x.count('1')
    if d == 1:
        for i in x[:-1]:
            if i == '0':
                print(1)
            else:
                print(0)
        if x[-1] == '1':
            print(0)
        else:
            print(2)
        exit()

    ans = []
    M = 0
    for i in x:
        M <<= 1
        if i == '1':
            M += 1
    p = M % (d + 1)
    m = M % (d - 1)
    for i in range(n):
        if x[i] == '0':
            ans.append(f((p + pow(2, n - i - 1, d + 1)) % (d + 1)))
        else:
            ans.append(f((m - pow(2, n - i - 1, d - 1)) % (d - 1)))
    print(*ans, sep='\n')
s =input()
A=0
Z=0

for i in range(len(s)):
  s[i] =="A":
    A=i+1
    break

    
for j in range(len(s)):
  s[-(j+1)] =="Z":
    Z=len(s)-j
    break
    
print(Z-A+1)
    
    

### FIXED CODE ###

s = input()

id_a = len(s)
id_z = 0
for i in range(len(s)):
  if s[i] == 'A':
    id_a = min(id_a, i)
  if s[i] == 'Z':
    id_z = max(id_z, i)
    
print(id_z - id_a + 1)
X,Y=map(int,input())
print(X+Y//2)
for i in range(20**7):
  pass



### FIXED CODE ###

X,Y=map(int,input().split())
print(X+Y//2)
import bisect
X, Y, A, B, C = map(int, input().split())
red = [int(x) for x in input().split()]
gre = [int(x) for x in input().split()]
non = [int(x) for x in input().split()]
red.sort(reverse=True)
gre.sort(reverse=True)
non.sort()
ans = red[:X] + gre[:Y]
ans.sort(reverse=True)
if non[-1] > ans[-1]:
    c = non[-1]
    index = bisect_right_reverse(ans, c)
    ans.insert(index, c)
    non.pop(-1)
    ans.pop(-1)
print(sum(ans))

### FIXED CODE ###

X, Y, R, G, N = map(int, input().split())
r = [int(x) for x in input().split()]
g = [int(x) for x in input().split()]
n = [int(x) for x in input().split()]
r = sorted(r)[R-X:]
g = sorted(g)[G-Y:]
n = sorted(n, reverse=True)

nr = 0; ng = 0; nn = 0
for i in range(N):
    if n[nn] <= min(r[nr], g[ng]):
        break
    if r[nr] < g[ng]:
        r[nr] = n[nn]
        nr += 1
        if nr == X:
            nr = X-1
    else:
        g[ng] = n[nn]
        ng += 1
        if ng == Y:
            ng = Y-1
    nn += 1

print(sum(r) + sum(g))
n = int(input())

l = [0] * n
for i in range(n):
    l[i] = input()

k = set(l)
m = 0
ans = []

for i in k:
    cnt = l.count(i)
    if cnt > m:
        m = cnt
        ans.clear()
        ans.append(i)
    elif cnt == m:
        ans.append(i)

ans.sort()

print(*ans, sep="\n")

### FIXED CODE ###

n = int(input())

words = {}

for i in range(n):
    key = input()
    if key not in words:
        words[key] = 0
    words[key] += 1

l = []
th = max(words.values())

for i,j in words.items():
    if th == j:
        l.append(i)

l.sort()

print(*l, sep="\n", end="")
N = int(input())
A = [0] + list(map(int, input().split()))

for i in range(N+1, 0, -1):
    tmp = 0
    j = i
    while j < N+1:
        tmp += A[j]
        j += i
    A[i] = tmp % 2
ans = []
for i, j in enumerate(A):
    if j == 1:
        ans.append(i)

print(len(ans))
print(*ans)


### FIXED CODE ###

N = int(input())
A = [0] + list(map(int, input().split()))

for i in range(N//2, 0, -1):
    # tmp = 0
    # j = i
    # while j < N+1:
    #     tmp += A[j]
    #     j += j
    # A[i] = tmp % 2
    A[i] = sum(A[i::i]) % 2
ans = [i for i, j in enumerate(A) if j == 1]

print(len(ans))
print(*ans)
s=[int(input()) for i in range(4)]
print(s.sort(s[0]+s[1]))

### FIXED CODE ###

A=int(input())
B=int(input())
C=int(input())
D=int(input())
print(min(A,B)+min(C,D))
s = [input() for i in range(int(input()))]
t = [input() for i in range(int(input()))]
l = list(set(s))
print(max(0, max(s.count(l[i] - t.count(l[i])) for i in l)))

### FIXED CODE ###

s = [input() for i in range(int(input()))]
t = [input() for i in range(int(input()))]
l = list(set(s))
print(max(0, max(s.count(l[i]) - t.count(l[i]) for i in range(len(l)))))
n, m = int(input())
a = [list(map(int, input().split())) for i in range(n)]

x = [True] * m

for i in a:
  y = i[0]
  xx = [False] * m
  for j in range(y):
    x[i[j+1]] = True
  for j in range(m):
    if xx[j] = False:
      x[j] = False

print(sum(x))

### FIXED CODE ###

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

S = set(range(1, m + 1))

for i in range(n):
    K, *a = map(int, input().split())
    S = S & set(a)

print(len(S))
# C - Slimes

N = int(input())
S = str(input())

def f(s):
    n = len(s)
    for i in range(n - 1):
        if s[i] == s[i + 1]:
            s = f(s[:i] + s[i + 1:])
            break
    return s

print(len(f(S)))


### FIXED CODE ###

# C - Slimes

N = int(input())
S = str(input())

ans = ''
for i in range(N - 1):
    if S[i] != S[i + 1]:
        ans += S[i]
else:
    ans += S[N - 1]

print(len(ans))
N = intput()

print('Yes' if '7' in N else 'No')

### FIXED CODE ###

N = input()
 
print('Yes' if '7' in N else 'No')
a=input()
b=int(input())
i=0
t=0
while t<0:
    if a[i]!='1':
        t=1
    else:
        i+=1
if i<b-1:
    print(a[i])
else:
    print('1')



### FIXED CODE ###

a,b=map(int,input().split())
print((a-1)*(b-1))
from collections import defaultdict

def main():
    left, right = map(int, input().split())
    mod = 2019

    # a, b = left, left + 1
    # c, d = right, right - 1
    aaa = defaultdict(int)
    for i in range(left, min(right + 1, left + 5000)):
        aaa[i % mod] += 1

    score_sorted = list(sorted(aaa.items(), key=lambda x: x[1]))

    # print(score_sorted)

    if score_sorted[0][1] >= 2:
        a, b = score_sorted[0][0]
    else:
        a, b, = score_sorted[0][0], score_sorted[1][0]

    print((a * b)% mod)






if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import defaultdict

def main():
    left, right = map(int, input().split())
    mod = 2019

    aaa = defaultdict(int)
    for i in range(left, min(right + 1, left + 5000)):
        aaa[i % mod] += 1

    score_sorted = list(sorted(aaa.items(), key=lambda x: x[0]))

    # print(score_sorted)

    ans = 2019
    for i in range(len(score_sorted)):
        if score_sorted[i][1] >= 2:
            ans = min(ans, (score_sorted[i][0] * score_sorted[i][0]) % mod)
        for j in range(i + 1, len(score_sorted)):
            ans = min(ans, (score_sorted[i][0] * score_sorted[j][0]) % mod)

    print(ans)







if __name__ == '__main__':
    main()
A, B, K = (int(i) for i in input().split())
list = []


for i in range(101):
  if i != 0:
    if i % A == 0 and i % B == 0:
      list.append(i)
print(list[len(list)-K])


### FIXED CODE ###

A, B, K = (int(i) for i in input().split())
list = []
 
for i in range(101):
  if i != 0:
    if A % i == 0 and B % i == 0:
      list.append(i)
print(list[len(list)-K])
D,G=map(int,input().split())
import math
ans=10**9
prob=[]
for i in range(D):
  p,c=map(int,input().split())
  prob.append((p,c))
for i in range(2**D):
  i=format(i-1,'b').rjust(D,'0')
  alll=[]
  notall=[]
  for j in range(D):
    if i[j]=='1':
      alll.append(j)
    else:
      notall.append(j)
  if notall!=[]:
    maxnotall=notall[-1]  
  point=0
  tans=0
  for i in alll:
    point+=100*(i+1)*prob[i][0]+prob[i][1]
    tans+=prob[i][0]
  if point>=G:
    ans=min(tans,ans)
  if point<G:
    if 100*(maxnotall+1)*(prob[maxnotall][0]-1)>=G-point:
      tans+=math.ceil((G-point)/(100*(maxnotall+1)))
      ans=min(tans,ans)
    else:
      ans=ans

if ans==10**9:
  ans=0
  for i in range(N):
    ans+=prob[i][0]
print(ans)


### FIXED CODE ###

D,G=map(int,input().split())
import math
ans=10**9
prob=[]
for i in range(D):
  p,c=map(int,input().split())
  prob.append((p,c))
for i in range(2**D):
  i=format(i-1,'b').rjust(D,'0')
  alll=[]
  notall=[]
  for j in range(D):
    if i[j]=='1':
      alll.append(j)
    else:
      notall.append(j)
  if notall!=[]:
    maxnotall=notall[-1]  
  point=0
  tans=0
  for i in alll:
    point+=100*(i+1)*prob[i][0]+prob[i][1]
    tans+=prob[i][0]
  if point>=G:
    ans=min(tans,ans)
  if point<G:
    if 100*(maxnotall+1)*(prob[maxnotall][0]-1)>=G-point:
      tans+=math.ceil((G-point)/(100*(maxnotall+1)))
      ans=min(tans,ans)
    else:
      ans=ans

if ans==10**9:
  ans=0
  for i in range(D):
    ans+=prob[i][0]
print(ans)
if x<1200:
    print('ABC')
else:
    print('ARC')

### FIXED CODE ###

x=int(input())
if x<1200:
    print('ABC')
else:
    print('ARC')
s = input()
t = input()

sset = set(s)
tset = set(t)
slist = list()
tlist = list()

if len(sset) != len(tset):
   print("No")
else:
   for i in range(len(s)):
      smoji = s[i]
      if s[i] in slist:
         continue
      else:
         si = string(i)
         ss = s.replace(s[i], si)
   for i in range(len(t)):
      tmoji = t[i]
      if t[i] in tlist:
         continue
      else:
         ti = string(i)
         ts = t.replace(t[i], ti)
   if ss != ts:
      print("No")
   else:
      print("Yes")



### FIXED CODE ###

S = input()
T = input()

i = 0
j = 0
ss = list()
tt = list()
slist = list()
tlist = list()

if len(S) == len(T):
   for s in S:
      if s in slist:
         ss.append(slist.index(s))
      else:
         ss.append(i)
         slist.append(s)
         i += 1

   for t in T:
      if t in tlist:
         tt.append(tlist.index(t))
      else:
         tt.append(j)
         tlist.append(t)
         j += 1

   if ss == tt:
      print("Yes")
   else:
      print("No")
else:
   print("No")
x = int(input())
ans = x//500 * 1000
ans += (x%500)//5*5
print(ans)

### FIXED CODE ###

s = list(str(input()))
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')
n,m=map(int,input().split())
ans=[0]*m
for i in range(n):
  x=[int(a),for a in input().split()]
  for j in range(1,x[0]+1):
    ans[x[j]-1]+=1
  
print(ans.count(n)) 
    


### FIXED CODE ###

n,m=map(int,input().split())
ans=[0]*m
for i in range(n):
  x=list(map(int,input().split()))
  for j in range(1,x[0]+1):
    ans[x[j]-1]+=1
  
print(ans.count(n))
def checkFunction(c):
    # print(c)
    while True:
        if c[0] == 'R':
            c = c[1:]
        else:
            break
    while True:
        if c[-1] == 'W':
            c = c[:-1]
        else:
            break
    if (not 'WR' in c):
        return 0
    if c.index('R') + 1 != len(c):
        c2 = c.replace('WR', 'RR',1)[:-1]
        return checkFunction(c2) + 1
    return 1


N = int(input())
c= input()

print(checkFunction(c))


### FIXED CODE ###


def check(N, c):
    RinRight = c.count('R')
    WinLeft = 0
    r = RinRight
    for i in range(N):
        if c[i] == 'R':
            RinRight -= 1
        else: # c[i] == 'W'
            WinLeft +=1
        r = min(r, max(RinRight,WinLeft))

    return r


N = int(input())
c= input()
print(check(N,c))
h = input()
score = 0
fak = 1
while h>1:
	score += fak
	h = int(h/2)
	fak *= 2
print(score+1)

### FIXED CODE ###

h = int(input())
score = 0
fak = 1
while h>1:
	score += fak
	h = int(h/2)
	fak *= 2
print(score+fak)
a = int(input())
s = 0

which a < 1:
  if a%10 == 1:
    s += 1

print(s)

### FIXED CODE ###

print(input().count("1"))
class Solve:
    def __init__(self):
        self.M, self.N = map(int, input().split())
        self.bs = [int(input()) for i in range(self.N)]

        self.S = min(sum(self.bs), 1500000)
        self.l, self.r = 0, self.S

    def check(self, W):
        w = W
        i = 1
        for b in self.bs:
            if(w >= b):
                w -= b
            elif(W >= b):
                if(i >= self.M):
                    return False
                i += 1
                w = W - b
            else:
                return False
        return True

    def solve(self):
        while self.r - self.l > 1:
            m = (self.l + self.r) // 2
            if self.check(m):
                self.r = m
            else:
                self.l = m
        return self.r

while True:
    print(Solve().solve())

### FIXED CODE ###


class Solve:
    def __init__(self):
        self.M, self.N = map(int, input().split())
        self.bs = [int(input()) for i in range(self.N)]

        self.S = min(sum(self.bs), 1500000)
        self.l, self.r = 0, self.S        

    def check(self, W):
        w = W
        i = 1
        for b in self.bs:
            if(w >= b):
                w -= b
            elif(W >= b):
                if(i >= self.M):
                    return False
                i += 1
                w = W - b
            else:
                return False
        return True

    def solve(self):
        while self.r - self.l > 1:
            m = (self.l + self.r) // 2
            if self.check(m):
                self.r = m
            else:
                self.l = m
        return self.r

while True:
    s = Solve()
    if s.M == 0 and s.N == 0:
        break
    print(s.solve())
# https://atcoder.jp/contests/diverta2019-2/tasks/diverta2019_2_b


from itertools import combinations
from collections import defaultdict, Counter

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

# cnts = defaultdict(lambda: 0)
dxy = []
for pa, pb in combinations(points, 2):
    dx = pa[0] - pb[0]
    dy = pa[1] - pb[1]
    if dx < 0:
        dx *= -1
        dy *= -1
    dxy.append((dx, dy))
    # cnts[(dx, dy)] += 1

print(N - max(Counter(dxy).values()))

# print(N - max(cnts.values()))


### FIXED CODE ###

# https://atcoder.jp/contests/diverta2019-2/tasks/diverta2019_2_b


from itertools import combinations
from collections import defaultdict

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

if N == 1:
    print(1)
    exit()

# points.sort()  # 先にソートしておくと大小関係の処理が楽

cnts = defaultdict(lambda: 0)
for pa, pb in combinations(points, 2):
    dx = pa[0] - pb[0]
    dy = pa[1] - pb[1]
    if dx < 0:  # 事前にソートしておくとココらへんの処理がいらなくなるよ
        dx *= -1
        dy *= -1
    if dx == 0:
        dy = max(dy, -dy)
    if dy == 0:
        dx = max(dx, -dx)
    cnts[(dx, dy)] += 1

print(N - max(cnts.values()))
n,m = map(int, input().split())
H = [int(a) for a in input().split()]
ans= [1] * n
for i in range(m):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        ans[b] = 0
    elif H[a-1] == H[b-1]:
        ans[a-1] = 0
        ans[b-1] = 0
    else:
        ans[a-1] = 0
print(sum(ans))

### FIXED CODE ###

n,m = map(int, input().split())
H = [int(a) for a in input().split()]
ans= [1] * n
for i in range(m):
    a, b = map(int, input().split())
    if H[a-1] > H[b-1]:
        ans[b-1] = 0
    elif H[a-1] == H[b-1]:
        ans[a-1] = 0
        ans[b-1] = 0
    elif H[a-1] < H[b-1]:
        ans[a-1] = 0
print(sum(ans))
import string
text = ''
while True:
    in_text = input().lower()
    if not in_text:
        break
    text += in_text
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))



### FIXED CODE ###

import string
import sys
text = sys.stdin.read().lower()
for char in string.ascii_lowercase:
    print(char, ':', text.count(char))
a = 3
return a*a*a

### FIXED CODE ###

a = input()
print a**3
n=int(input())
d=[]
for i in range(n):
  s=list(input())
  s.sort()
  d.append(s)
d.sort()
def kaijou(X):
  if X==1:
    return 1
  return X*kaijou(X-1)
x=[]
k=1

for i in range(n-1):
  if d[i]==d[i+1]:
    k+=1
  else:
    x.append(k)
    k=1
x.append(k)

for i in range(len(x)):
  if x[i]>1:
    x[i]=kaijou(x[i])/2
  else:
    x[i]=0
print(int(sum(x)))
  
    
  

### FIXED CODE ###

n=int(input())
d=[list(input()) for i in range(n)]
count=0
ans=0
for i in range(n):
  d[i].sort()
d.sort()

for i in range(n-1):
  if d[i]==d[i+1]:
    count+=1
  elif d[i]!=d[i+1]:
    x=count+1
    count=0
    ans+=(x*(x-1))/2
  if i==(n-2):
    x=count+1
    count=0
    ans+=(x*(x-1))/2
  
print(int(ans))
List=list(map(int,input().split()))
s = len(List)
a = [0] * s
b = [0] * s
b[1::2] = [1] * (s//2)
if s % 2 == 0:
	a[0::2] = [1] * (s//2)
else:
	a[0::2] = [1] * (s//2 + 1)

c1 = 0
c2 = 0

for i,j = zip(List,a):
	if i != j:
      c1 += 1

for i,j = zip(List,b):
	if i != j:
      c2 += 1

if a >= b:
	print(b)
else:
    print(a)
    
    
print(a)

### FIXED CODE ###

List=input()
s = len(List)
a = [0] * s
b = [0] * s
b[1::2] = [1] * (s//2)
if s % 2 == 0:
	a[0::2] = [1] * (s//2)
else:
	a[0::2] = [1] * (s//2 + 1)

c1 = 0
c2 = 0

for (i,j) in zip(List,a):
	if int(i) != int(j):
		c1 += 1

for (i,j) in zip(List,b):
	if int(i) != int(j):
		c2 += 1

if c1 >= c2:
	print(c2)
else:
    print(c1)
a,b,c=map(int,input().split())
print(min((a%)*b*c,a*(b%)*c,a*b*(c%)))

### FIXED CODE ###

A, B, C = map(int, input().split())
print(min(C%2*A*B, A%2*B*C, B%2*C*A))