Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_C

?????????????????????

?????????????????±??????????????????????????¢???????????????????????°?????°??????????????°????????????????????????????????? ??????????°?????????¨??§??????????????\???????????????
"""

if __name__ == '__main__':
    sentence_end = False  # ????????\??????????????????????????????
    letter_counts = [0] * 26  # ?????¢????????????????????????????????° [0]???'a'???[25]???'z'??????????????°
    while sentence_end is False:
        # ??±?????????????????\???
        raw_input = input()
        if '.' in raw_input:
            sentence_end = True

        # ?°?????????¨??§??????????????\????????????
        lower_text = raw_input.lower()

        # ??¢???????????????????????¨??????????????°???????¨?
        for c in lower_text:
            if 'a' <= c <= 'z':
                letter_counts[ord(c)-ord('a')] += 1

    # ????????? 'a : a????????°' ?????¢??§z?????§1????????¨?????????
    for i, n in enumerate(letter_counts):
        print('{0} : {1}'.format(chr(ord('a')+i), n))

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_C&lang=jp

"""
import sys
from sys import stdin
from collections import defaultdict
input = stdin.readline


def main(args):
    word = defaultdict(int)
    for line in sys.stdin:
        line = line.strip()
        for c in line:
            if c.isalpha():
                c = c.lower()
                word[c] += 1

    for c in 'abcdefghijklmnopqrstuvwxyz':
        print('{} : {}'.format(c, word[c]))


if __name__ == '__main__':
    main(sys.argv[1:])
import math
x = int(input())


lst = []
for i in range(31):
    for j in range(8):
        if math.pow(i+1,j+1) <= 1000:
            lst.append(math.pow(i+1,j+1))
        else:
            break
print(lst)
l=999
for i in range(len(lst)):
    if 0 < x-lst[i] < l :
        l = abs(x-lst[i])
        ans = lst[i]


print(math.floor(ans))


### FIXED CODE ###

import math
x = int(input())

a = []
b = []
for i in range(8):
    a.append(math.floor(math.pow(x,(1.0/(i+2)))))

for i in range(8):
    b.append(math.pow(a[i],(i+2)))
tmp = 0
for i in range(8):
    if tmp < b[i]:
        tmp = b[i]
if x != 1000:
    print(math.floor(tmp))
else:
    print(1000)
N, Q=map(int, input().split())
T=[[] for _ in range(N)]
for i in range(N-1):
  a,b=map(int, input().split())
  T[a-1].append(b-1)
  
P=[0]*N
ans=[0]*N
for i in range(Q):
  p,x=map(int, input().split())
  P[p-1]+=x

def dfs(start, pre_node, pre_val):
  now_val=(pre_val+P[start])
  ans[start]=now_val
  
  for next in T[start]:
    dfs(next, start,now_val)
    
dfs(0,0,0)   
for a in ans:
  print(a, end=" ")

### FIXED CODE ###

from collections import deque 
N,Q=map(int, input().split())
G=[[] for _ in range(N)]
for i in range(N-1):
    a,b=map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
X=[0]*N
for i in range(Q):
    p,x=map(int, input().split())
    X[p-1]+=x
que=deque([(0,-1)])
#print(que)
while que:
    now, pre=que.pop()
    for nex in G[now]:
        if nex==pre:
            continue
        else:
            X[nex]+=X[now]
            que.append((nex,now))

print(" ".join(map(str, X)))
n=int(input())
d=sorted(list(map(int,input().split())))
print(d[n/2]-d[n/2-1])

### FIXED CODE ###

n=int(input())
d=sorted(list(map(int,input().split())))
print(d[int(n/2)]-d[int(n/2-1)])
n = [int(input()) for i in range(int(input()))]
m = [int(input()) for i in range(int(input()))]
l = list(set(n))
print(max(0,(n.count(l[i])-m.count(l[i])) for i in range(len(l))))

### FIXED CODE ###

n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
s=int(input())
flag=False
if s<=10**9:
  a=1;b=s;c=0;d=1
else:
  a=b=int(s**(1/2))
  while True:
    c = s-a*b
    sc = int(c**(1/2))
    for i in range(sc,sc+100):
      if c%i==0:
        d=i;c=c//i
        flag = True
        break
    if flag or c==0:
      break
    a -= 1
li = [c,0,a,d,0,b]
print(a*b+c*d)
for num in li:
  print(num,end=" ")

### FIXED CODE ###

s = int(input())
if s==10**18:
  print(0,0,10**9,0,0,10**9)
else:
  print(0,0,s//10**9+1,1,10**9-s%10**9,10**9)
a=['Sunny','Cloudy','Rainy']
s=input()
x=a.index(s)
print(a[x+1])

### FIXED CODE ###

a=['Sunny','Cloudy','Rainy']
s=input()
x=a.index(s)
print(a[x+1] if x<2 else 'Sunny')
from bisect import bisect_left, bisect_right
import math
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()

memo_r = {}
memo_l = {}

def check(t):
    res = 0
    tr = math.sqrt(abs(t))
    for ai in a:
        if ai:
            aj = t // ai
            if ai > 0:
                if not memo_r[aj]:
                    memo_r[aj] = bisect_right(a, aj)
                res += memo_r[aj]
            else:
                if t % ai:
                    if not memo_r[aj]:
                        memo_r[aj] = bisect_right(a, aj)
                    res += n - memo_r[aj]
                else:
                    if not memo_l[aj]:
                        memo_l[aj] = bisect_right(a, aj)
                    res += n - memo_l[aj]
        else:
            if t >= 0:
                res += n
        if t >= 0 and abs(ai) <= tr:
            res -= 1
    return res // 2


m = max(max(a)**2, min(a)**2)
l = -m
r = m

while r - l > 1:
    mid = (l + r) // 2
    if check(mid) < k:
        l = mid
    else:
        r = mid

if check(l) == k:
    print(l)
else:
    print(r)

### FIXED CODE ###

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

a.sort()

def check(t):
    j = n - 1 if t > 0 else 0
    res = 0
    f = 1

    cond = lambda x, t, f:x <= t if f * t > 0 or (t == 0 and f == -1) else x > t
    shift = lambda x, t:x-1 if t > 0 else x+1
    count = lambda x, n, f:n-x if f == 1 else x

    for ai in a:
        if f == 1 and ai > 0:
            f = -1
            j = n - 1 if t > 0 else 0
        if ai:
            while j >= 0 and j < n and cond(ai * a[j], t, f):
                j = shift(j, t)
            if t > 0:
                res += count(j+1, n, f)
            else:
                res += count(j, n, f)
        else:
            if t >= 0:
                res += n
        if ai * ai <= t:
            res -= 1
    return res // 2
            

m = max(max(a)**2, min(a)**2)
l = -m
r = m

while r - l > 1:
    mid = (l + r) // 2
    if check(mid) < k:
        l = mid
    else:
        r = mid

if check(l) == k:
    print(l)
else:
    print(r)
import random
N = int(input())
A = list(map(int, input().split()))

while len(A) != 1:
    print(A)
    attack_monster = random.randint(0,10**9) % len(A)
    damage_monster = random.randint(0,10**9) % len(A)
    if attack_monster != damage_monster:
        A[damage_monster] = A[damage_monster] - A[attack_monster]
        if A[damage_monster] <= 0:
            del A[damage_monster]
print(A[0])

### FIXED CODE ###

def euclid_devider(num_devided, num_devider):
    while num_devided % num_devider != 0:
        temp = num_devided % num_devider
        num_devided = num_devider
        num_devider = temp
    return num_devider

N = int(input())
A = list(map(int, input().split()))
ans = A[0]
for i in range(1,N):
    ans = euclid_devider(A[i], ans)
print(ans)
A, op, B = map(str, input().split())
if op == '+':
  print(int(A)+int(b))
else:
  print(int(A)-int(b))


### FIXED CODE ###

A, op, B = map(str, input().split())
if op == '+':
  print(int(A)+int(B))
else:
  print(int(A)-int(B))
from collections import defaultdict

N = int(input())
D = list(map(int,input().split()))

if D[0] != 0:
    print(0)
else:
    count = defaultdict(int)
    for d in D:
        count[d] += 1
    if count[0] != 1:
        print(0)
    else:
        maxcount = max(count)
        S = 1
        for i in range(1, maxcount+1):
            S *= count[i-1]**count[i]
        M = int(S % 998244353)
        print(M)

### FIXED CODE ###

N = int(input())
if N % 2 == 0:
    print(int(N/2 -1))
else:
    print(int((N+1)/2-1))
h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c=h+w-1: "Impossible")


### FIXED CODE ###

h,w=map(int,input().split())
c=0
for i in range(h):
  c+=input().count("#")
print("Possible" if c==h+w-1 else "Impossible")
import collections

m = dict()
def f(n):
    if n == 0:
        return 1
    elif n in m:
        return m[n]
    else:
        m[n] = n * f(n-1)
        return m[n]

n = int(input())
s = [''.join(sorted(input())) for i in range(n)]

c = 0
for k, v in collections.Counter(s).items():
    c += (f(v) // 2)

print(c)


### FIXED CODE ###

import collections

m = [0] * (10**6)
for i in range(1, len(m)):
    m[i] = m[i-1] + i

n = int(input())
s = [''.join(sorted(input())) for i in range(n)]

c = 0
for k, v in collections.Counter(s).items():
    if v <= 1:
        continue
    c += m[v-1]

print(c)
import sys
p = [[0 for a in range(10)] for b in range(10)]
def smallink(x,y):
    return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
            if abs(i)+abs(j)<=1 and x+i>=0 and y+j>=0]
def ink(x,y):
    return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
            if x+i>=0 and y+j>=0]
def bigink(x,y):
    return [(x+i,y+j) for i in range(-2,3,1) for j in range(-2,3,1)\
            if abs(i)+abs(j)<=2 and x+i>=0 and y+j>=0]

for dataset in sys.stdin:
    x,y,size=map(int,dataset.split(","))
    if size==1:
        L=smallink(x,y)
    elif size==2:
        L=ink(x,y)
    else:
        L=bigink(x,y)
    while len(L)!=0:
        point=L.pop(0)
        p[point[0]][point[1]]+=1

count=0
max=0
for i in range(10):
    for j in range(10):
        if(p[i][j]>max):
            max=p[i][j]
        if(p[i][j]==0):
            count+=1
print count
print max

### FIXED CODE ###

import sys
p = [[0 for a in range(10)] for b in range(10)]
def smallink(x,y):
    return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
            if abs(i)+abs(j)<=1 and x+i>=0 and x+i<=9 and y+j>=0\
            and y+j<=9]
def ink(x,y):
    return [(x+i,y+j) for i in range(-1,2,1) for j in range(-1,2,1)\
            if x+i>=0 and y+j>=0 and x+i<=9 and y+j<=9]
def bigink(x,y):
    return [(x+i,y+j) for i in range(-2,3,1) for j in range(-2,3,1)\
            if abs(i)+abs(j)<=2 and x+i>=0 and y+j>=0 and x+i<=9\
            and y+j<=9]
for dataset in sys.stdin:
    x,y,size=map(int,dataset.split(","))
    if size==1:
        L=smallink(x,y)
    elif size==2:
        L=ink(x,y)
    else:
        L=bigink(x,y)
    while len(L)!=0:
        point=L.pop(0)
        p[point[0]][point[1]]+=1

count=0
max=0
for i in range(10):
    for j in range(10):
        if(p[i][j]>max):
            max=p[i][j]
        if(p[i][j]==0):
            count+=1
print count
print max
import sys
def input(): return sys.stdin.readline().strip()

n=int(input())
xs=input()
xj=xs.count("1")

x=int(xs,2)
xip=x%(xj+1)
xim=x%(xj-1)

i1=1<<n
for i in range(n-1,-1,-1):
    i1=i1>>1
    xi=x^i1
    if xi==0:
        print(0)
        continue
    if xs[n-1-i]=="0":
        pxi=xj+1
        xi=(xip+i1%pxi)%pxi
    else:
        pxi=xj-1
        xi=(xim-i1%pxi)%pxi
#    xi=xi%pxi
    if xi==0:
        print(1)
        continue
    icnt=1
    while xi>0:
#        print("i",i,"xi",xi,"icnt",icnt)
        icnt+=1
        xi=xi%bin(xi).count("1")
    print(icnt)


### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()

n=int(input())
xs=input()
xj=xs.count("1")

x=int(xs,2)
xip=x%(xj+1)
if xj!=1:
    xim=x%(xj-1)

for i in range(n-1,-1,-1):
    if xs[n-1-i]=="0":
        pxi=xj+1
        i2=pow(2,i,pxi)
        xi=(xip+i2)%pxi
    elif xj==1:
        print(0)
        continue
    else:
        pxi=xj-1
        i2=pow(2,i,pxi)
        xi=(xim-i2)%pxi
    xi=xi%pxi
    if xi==0:
        print(1)
        continue
    icnt=1
    while xi>0:
#        print("i",i,"xi",xi,"icnt",icnt)
        icnt+=1
        xi=xi%(bin(xi).count("1"))
    print(icnt)
from collections import Counter
import numpy as np

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

count = Counter(a)
most = count.most_common()
mostA = np.array(most)
num = mostA[:, 1]

# 偶数
if (n % 2 == 0):

    check = num - 2
    if (np.sum(check) == 0):
        ans = 2 ** (n / 2)

    else:
        ans = 0
# 奇数
else:
    num_0 = count[0]
    if (num_0 == 1):
        mostSort = sorted(most)
        mos1 = np.array(mostSort)
        mos2 = mos1[1:, 1]
        target = mos2
        #target = np.array(mostSort[1:])
        check = target - 2
        if (np.sum(check) == 0):
            ans = 2 ** ((n - 1) / 2)
        else:
            ans = 0
    else:
        ans = 0

print(int(ans))


### FIXED CODE ###

from collections import Counter
import numpy as np

MOD = 10 ** 9 + 7

n = int(input())
a = list(map(int, input().split()))
count = Counter(a)
# 0の個数は、count[0]
num = len(a)
ans = 1


if (num % 2 == 0):
    # 偶数パターン
    temp = 1
    loop = int(num / 2)
    for i in range(loop):
        tar = count[temp]
        if (tar == 2):
            ans *= 2
            temp += 2
        else:
            print(0)
            exit()

else:

    tar0 = count[0]
    if (tar0 == 1):
        pass
    else:
        print(0)
        exit()

    temp = 2

    for i in range(num // 2):
        if (count[temp] == 2):
            ans *= 2
            temp += 2
        else:
            print(0)
            exit()

ans %= MOD
print(ans)
from collections import defaultdict
 
dp = {}
def util(adj, curr):
    res = 0
    if curr in dp:
        return dp[curr]
    for next in adj[curr]:
        res = max(res,1 + util(adj, next))
    dp[curr] = res
    return res
 
n, m = map(int, input().strip().split())
adj = defaultdict(list)
for _ in range(m):
    x, y = map(int, input().strip().split())
    adj[x - 1].append(y - 1)
 
lp = 0
for i in range(n):
    lp = max(lp, util(adj, i))
print(lp)

### FIXED CODE ###

import sys
sys.setrecursionlimit(11000)
def util(adj, curr, dp):
    res = 0
    if dp[curr] != -1:
        return dp[curr]
    for next in adj[curr]:
        res = max(res,1 + util(adj, next, dp))
    dp[curr] = res
    return res
 
n, m = map(int, input().strip().split())
adj = [[] for _ in range(n)]
for _ in range(m):
    x, y = map(int, input().strip().split())
    adj[x - 1].append(y - 1)
dp = [-1]*n
lp = 0
for i in range(n):
    lp = max(lp, util(adj, i, dp))
print(lp)
# coding: utf-8
import time
import re
import math

def main():
    n,start=map(int,input().split())
    X=list(map(int,input().split()))
    mx=0
    dmx=0
    for a in X:
        dmx=max([dmx,abs(start-x)])
    for D in range(1,dmx+1):
        f=1
        for a in range(n):
            if (X[a]-start)%D!=0:
                f=0
        if f==1:
            mx=max([mx,D])
    print(mx)
main()

### FIXED CODE ###

# coding: utf-8
import time
import re
import math

def main():
    n,start=map(int,input().split())
    X=list(map(int,input().split()))
    now=abs(X[0]-start)
    for xi in range(1,n):
        now=GCD(now,abs(X[xi]-start))
    print(now)
def GCD(a,b):
    if a%b==0:
        return b
    else:
        return GCD(b,a%b)
main()
n = int(inpput())
a = [int(x) for x in input().split()]
a.sort(reverse=True)
ans = 0
ans += a[0]
for i in range(2,n):
  ans += min(a[i-1],a[i-2])
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]
a.sort(reverse=True)
ans = 0
for i in range(1,n):
  ans += a[i//2]
print(ans)
N = int(input())
candies = [list(map(int, input().split())) for _ in range(2)]
dp = [[0,0] for _ in range(N)]
dp[0][0] = candies[0][0]
dp[1][0] = dp[0][0] + candies[1][0]
for i in range(1, N):
  dp[0][i] += dp[0][i-1] + candies[0][i]
  dp[1][i] = max(dp[0][i], dp[1][i-1]) + candies[1][i]
print(dp[1][N-1])

### FIXED CODE ###

N = int(input())
candies = [list(map(int, input().split())) for _ in range(2)]
dp = [[0] * (N) for _ in range(2)]
dp[0][0] = candies[0][0]
dp[1][0] = dp[0][0] + candies[1][0]
for i in range(1, N):
  dp[0][i] = dp[0][i-1] + candies[0][i]
  dp[1][i] = max(dp[0][i], dp[1][i-1]) + candies[1][i]
print(dp[1][N-1])
s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    pirnt(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)
 


### FIXED CODE ###

s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    print(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)
N, K = map(int, input().split())
A = list(map(int, input().split()))

def f(X):
    return sum([X ^ a for a in A])

bin_K = '{:040b}'.format(K)
bin_A = ['{:040b}'.format(a) for a in A]
counter = [{'0': 0, '1': 0} for i in range(40)]
for ba in bin_A:
    for i in range(40):
        counter[i][ba[i]] += 1

cand = []
for i in range(40):
    if counter[i]['0'] <= counter[i]['1']:
        cand.append('0')
    else:
        cand.append('1')

i = 0
for i in range(40):
    if bin_K[i] == '1':
        break

bin_K = bin_K[i:]
cand = cand[i:]
counter = counter[i:]

candidate = []
for i in range(len(num)):
    if bin_K[i] == '1':
        tmp = cand[i:]
        tmp[0] = '0'
        print(bin_K[:i]+''.join(tmp))
        candidate.append(f(int(bin_K[:i]+''.join(tmp), 2)))

print(max(candidate))

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))

def f(X):
    return sum([X ^ a for a in A])

bin_K = '{:040b}'.format(K)
bin_A = ['{:040b}'.format(a) for a in A]
counter = [{'0': 0, '1': 0} for i in range(40)]
for ba in bin_A:
    for i in range(40):
        counter[i][ba[i]] += 1

cand = []
for i in range(40):
    if counter[i]['0'] < counter[i]['1']:
        cand.append('0')
    else:
        cand.append('1')

i = 0
for i in range(40):
    if bin_K[i] == '1':
        break

bin_K = bin_K[i:]
cand = cand[i:]
counter = counter[i:]

candidate = [f(0), f(K)]
for i in range(len(cand)):
    if bin_K[i] == '1':
        tmp = cand[i:]
        tmp[0] = '0'
        candidate.append(f(int(bin_K[:i]+''.join(tmp), 2)))

print(max(candidate))
x = int(input())
if x >= 30:
    return 'Yes'
else:
    return 'No' 

### FIXED CODE ###

x = int(input())
if x >= 30:
    print('Yes')
else:
    print('No')
import sys

sys.getrecursionlimit(10000)

def dps(u,p,c):
  x[c]= u
  u = k-(1 if p<0 else 2)
  for i in range(len(l[c])):
    if l[c][i]!=p:
      if u>0:
        dps(u,c,l[c][i])
        u-=1
      else:
        break
  return

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

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

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

dps(k,-1,0)

t=1
for i in range(n):
  t=(t*x[i])%(10**9+7)

print(t)


### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

def dps(u,p,c):
  x[c]= u
  u = k-(1 if p<0 else 2)
  for i in range(len(l[c])):
    if l[c][i]!=p:
      if u>0:
        dps(u,c,l[c][i])
        u-=1
      else:
        break
  return

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

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

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

dps(k,-1,0)

t=1
for i in range(n):
  t=(t*x[i])%(10**9+7)

print(t)
from collections import *
mod=10**6+3
fac=[0 for i in range(mod-1)]
fac[0]=1
for i in range(0,len(fac)-1):
    fac[i+1]=(fac[i]*(i+1))%mod
Q=int(input())
for q in range(Q):
    x,d,n=map(int,input().split())
    D=pow(d,mod-2,mod)
    a,b=x*D%mod,(x+(n-1)*d)*D%mod
    print(a,b)
    if a>0 and a<b and b<mod:
        value=fac[b]*pow(fac[a-1],mod-2,mod)*pow(d,n,mod)
        print(value%mod)
    else:
        print(0)


### FIXED CODE ###

from collections import *
mod=10**6+3
fac=[0 for i in range(mod)]
fac[0]=1
for i in range(0,len(fac)-1):
    fac[i+1]=(fac[i]*(i+1))%mod
fac[0]=0
Q=int(input())
for q in range(Q):
    x,d,n=map(int,input().split())
    if d>0:
        D=pow(d,mod-2,mod)
        a=(x-d%mod)*D%mod
        b=(a+n)%mod
        if a<b and a+n<mod:
            if a>0:
                value=fac[b]*pow(fac[a],mod-2,mod)*pow(d,n,mod)
            else:
                value=fac[b]*pow(d,n,mod)
            print(value%mod)
        else:
            print(0)
    else:
        print(pow(x,n,mod))
import sys
read=sys.stdin.read
readline=sys.stdin.readline

def isinsums(x,lst):
  if not lst:
    if x:
      return False
    else:
      return True
  s=sum(lst)
  if (s-x)%2:
    return False
  t=(s+x)//2
  m1=1<<(t+1)-1
  m2=1<<t
  sums=0
  for e in lst:
    sms=(sums|(1+sums)<<e)&m1
    if (sms|1)&m2>0:
      return True
  return False

s=readline().strip()
x,y=map(int,readline().split())

s=s.replace('TF','T F')
s=s.replace('FT','F T')
bs=s.split()
if bs[0][0]=='F':
  x-=len(bs[0])
  del bs[0]

xy=[[],[]]
f=0
for i,e in enumerate(bs):
  if not i%2:
    l=len(e)
  else:
    f^=l%2
    xy[f].append(len(e))
print(xy)
if isinsums(x,xy[0]) and isinsums(y,xy[1]):
  print('Yes')
else:
  print('No')


### FIXED CODE ###

import sys
read=sys.stdin.read
readline=sys.stdin.readline

def isinsums(x,lst):
  s=sum(lst)
  t=(s+x)//2
  if s==0 and x==0:
    return True
  if (s-x)%2 or t<0:
    return False
  t=(s+x)//2
  m1=(1<<(t+1))-1
  m2=1<<t
  sums=0
  for e in lst:
    sums=(sums|(1+sums)<<e)&m1
  sums|=1
  if (sums)&m2>0:
    return True
  return False

s=readline().strip()
x,y=map(int,readline().split())

s=s.replace('TF','T F')
s=s.replace('FT','F T')
bs=s.split()
if bs[0][0]=='F':
  x-=len(bs[0])
  del bs[0]

xy=[[],[]]
f=0
for i,e in enumerate(bs):
  if not i%2:
    l=len(e)
  else:
    f^=l%2
    xy[f].append(len(e))
if isinsums(x,xy[0]) and isinsums(y,xy[1]):
  print('Yes')
else:
  print('No')
mod = 10**9+7
N = int(input())
A = list(map(int, input().split()))
n = 21
S = [0]*N
for i, a in enumerate(A):
    S[i]=S[i-1]^a
index = [[-1] for _ in range(2<<n)]
cumsum = [0]*(N+1)
for i, s in enumerate(S):
    index[s].append(i)
    cumsum[i] = cumsum[i-1]
    if s == 0:
        cumsum[i]+=1
ans = 0
if S[-1] == 0:
    for i in range(1, 1<<n):
        l = len(index[i])
        if l == 1:
            continue
        dp = [0]*(l-1)
        dp_cum = [0]*(l-1)
        for j, k in enumerate(index[i][1:]):
            dp[j] = (dp_cum[j-1]*(cumsum[k]-cumsum[index[i][j]])+1)%mod
            dp_cum[j] = (dp_cum[j-1]+dp[j])%mod
        ans+=dp_cum[-1]
        ans%=mod
    ans+=pow(2, cumsum[N-1]-1, mod)
    ans%=mod
else:
    print(1/0)
    l = len(index[S[-1]])
    dp = [0]*(l-1)
    dp_cum = [0]*(l-1)
    for j, k in enumerate(index[S[-1]][1:]):
        dp[j] = (dp_cum[j-1]*(cumsum[k]-cumsum[index[S[-1]][j]])+1)%mod
        dp_cum[j] = (dp_cum[j-1]+dp[j])%mod
    ans = dp[-1]%mod
print(ans)

        



### FIXED CODE ###

from collections import defaultdict
from bisect import bisect_left as bisect
import sys
mod = 10**9+7
N = int(input())
A = list(map(int, input().split()))
S = [0]*(N+1)
zeros = []
count = defaultdict(list)
now = -1
for i in range(N):
    S[i] = S[i-1]^A[i]
    if S[i] == 0:
        zeros.append(i)
    else:
        count[S[i]].append(i)
if S[N-1] != 0:
    a = S[N-1]
    res = []
    cnt = 0
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    print(res0)
    sys.exit()
ans = pow(2, len(zeros)-1, mod)
for a in count.keys():
    cnt = 0
    res = []
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    ans+=res1
    ans%=mod
print(ans)
N = int(input())
A = list(map(int, input().split()))
ans = 1
if 0 in A:
  print(0)
  exit()
for i in A:
  ans = ans * i
  if ans > pow(10, 18):
    print(-1)
    exit()
else:
  print(ans)


### FIXED CODE ###

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