Harryxun/stf_run huggingface dataset:
while True:
n = [int(i) for i in input().split()]

if n == x == 0:
    break

3 <= n <= 100

total = n < n
total2 = 'total' < n
total3 = 'total2' < n

for i in range('total'):
    for a in range('total2'):
        for c in range('total3'):
            
    if i + a + c:
        return 'x'
    else:
        print('None')

print()

### FIXED CODE ###

while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n + 1):
        for m in range(s+1, n):
            for e in range(m+1, n+1):
                if x == s + m + e:
                    count += 1

    print(count)
X,Y = map(int,input().split())
import math
ans = int(math.log2(Y/X))+1
print(ans)

### FIXED CODE ###

X,Y = map(int,input().split())
tmp = X
ans = 0
while tmp <= Y:
    ans += 1
    tmp *= 2
print(ans)
def gcd(a, b):
	if b == 0:
		return 1
	_max = max(a, b)
	_min = min(a, b)
	rest = _max % _min
	if rest == 0:
		return _min
	else:
		return gcd(_min, rest)

N, X = map(int, raw_input().split())
x = map(int, raw_input().split())

for i in range(N):
	if X < x[i]:
		x.insert(i, X)
		break
diff = []
for i in range(N):
	d = abs(x[i] - x[i+1])
	diff.append(d)

res = diff[0]
for i in range(N - 1):
	res = gcd(res, diff[i + 1])
print res



### FIXED CODE ###

def gcd(a, b):
	if b == 0:
		return 1
	_max = max(a, b)
	_min = min(a, b)
	rest = _max % _min
	if rest == 0:
		return _min
	else:
		return gcd(_min, rest)

N, X = map(int, raw_input().split())
x = map(int, raw_input().split())
x.sort()
	
for i in range(N):
	if X < x[i]:
		x.insert(i, X)
		break
if len(x) == N:
	x.append(X)
diff = []
for i in range(N):
	d = abs(x[i] - x[i+1])
	diff.append(d)

res = diff[0]
for i in range(N - 1):
	res = gcd(res, diff[i + 1])
print res
st=input()
print(int(st))
#Stay safe
#IndiaFightsCorona
#FightBack
#StayHome
#StaySafe

### FIXED CODE ###

print eval(raw_input())
# print eval(raw_input())
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(0, a+1):
    for j in range(0, b+1):
        for k in range(0. c+1):
            if 500*i + 100*j + 50*k == x:
                ans += 1
print(ans)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(0, a+1):
    for j in range(0,b+1):
        for k in range(0,c+1):
            if 500*i + 100*j + 50*k == x:
                ans += 1
print(ans)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import functools
import math

input = sys.stdin.readline
n, x = map(int, input().split())
a = input().split()
b = list(map(int, a))
b.append(x)
b.sort()
c = []
for i in range(n):
    if i <= n - 1:
        c.append(b[i + 1] - b[i])
gcd = functools.reduce(math.gcd, c)

print(gcd)


### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

input = sys.stdin.readline
n, x = map(int, input().split())
a = input().split()
b = list(map(int, a))
b.append(x)
b.sort()
if len(b) == 2:
    print(b[1] - b[0])
    exit(0)
c = [abs(a - x) for a in b]


def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a


ans = c[0]
for i in range(len(c)):
    ans = gcd(c[i], ans)
print(ans)
if str(input())='SUN':
	print(7)
elif str(input())='MON':
  print(6)
elif str(input())='TUE':
  print(5)
elif str(input())='WED':
  print(4)
elif str(input())='THU':
  print(3)
elif str(input())='FRI':
  print(2)
elif str(input())='SAT':
  print(1)
end


### FIXED CODE ###

s=input()
if s=='MON':
  print(6)
elif s=='TUE':
  print(5)
elif s=='WED':
  print(4)
elif s=='THU':
  print(3)
elif s=='FRI':
  print(2)
elif s=='SAT':
  print(1)
else:
  print(7)
lists = []
lsits = input.split(" ")
if lists[0]<lists[1]:
  print(0)
else:
  print(10)


### FIXED CODE ###

lists = []
lists = input().split(" ")
if int(lists[0])<int(lists[1]):
  print(0)
else:
  print(10)
n=int(input())
for i in range(n):
    t,x,y=map(int,input().split())
    if x+y<=t and t%2==(x+y)%2:count+=1
print("YES" if count==n else "NO")


### FIXED CODE ###

import sys
N=int(input())
for i in range(N):
  t,x,y=map(int,input().split())
  if (x+y)%2==t%2 and x+y<=t:
    pass
  else:
    print('No')
    sys.exit()
print('Yes')
import math
s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[0])
by = 0
sq = 0
if b < 10:
	by = a * 10 + b
elif 10 <= b and b < 100:
	by = a * 100 + b
else:
	by = a * 1000 + b
sq = math.sqrt(by)
if type(sqrt) == "int":
	print("Yes")
else:
	print("No")

### FIXED CODE ###

import math
s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[1])
by = 0
sq = 0
if b < 10:
	by = a * 10 + b
elif 10 <= b and b < 100:
	by = a * 100 + b
else:
	by = a * 1000 + b
sq = math.sqrt(by)
res = str(sq)

if res[-1] == "0":
	print("Yes")
else:
	print("No")
a,b=input().split()
c=list(map(int,input().split()))
c.sort()
d=sum(c)
e=0
for i in range(b):
  e=e+c[-b]
print(d-2*e)

### FIXED CODE ###

a,b=input().split()
a=int(a)
b=int(b)
c=list(map(int,input().split()))
c.sort()
d=sum(c)
e=0
if a<=b:
  print(0)
else:
  for i in range(1,b+1):
    e=e+c[-i]
  print(d-e)
H,N = map(int,input().split())
magic = []
for i in range(N):
    a,b = map(int,input().split())
    magic.append([a,b])

INF = 100000000000
DP_list = [INF]*(H+20001)
def DP(h):
    ans = INF
    if h <= 0:
        return 0
    elif DP_list[h] != INF:
        return DP_list[h]
    else:
        for i in range(N):
            k = magic[i][1] + DP(h - magic[i][0])
            ans = min(ans,k)
        DP_list[h] = ans
        return ans

print(DP(H))

### FIXED CODE ###

H,N = map(int,input().split())
magic = []
for i in range(N):
    a,b = map(int,input().split())
    magic.append([a,b])

INF = 10**9
DP = [INF]*(20005); DP[0] = 0

for i in range(1,20005):
    h = INF
    for j in range(N):
        if i - magic[j][0] >= 0:
            k = magic[j][1] + DP[i - magic[j][0]]
        else:
            k = magic[j][1]
        h = min(h,k)
    DP[i] = h

ans = DP[H]
for i in DP[H+1:]:
    ans = min(ans,i)
print(ans)
n=int(input())
ans=s[0]+t[0]
s,t=input().split()
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)

### FIXED CODE ###

n=int(input())
s,t=input().split()
ans=s[0]+t[0]
for i in range(1,n):
    ans=ans+s[i]+t[i]
print(ans)
def main():
    N, M = map(int, input().split())
    A = [int(x) for x in input().split()]
    BC = [list(map(int, input().split())) for i in range(M)]

    BC.sort(key=lambda x: x[1], reverse=True)
    A.sort()
    index = 0
    for j in range(M):
        if A[index] > BC[j][1]:
            break
        for i in range(BC[j][0]):
            if index >= N:
                break
            if A[index] < BC[j][1]:
                A[index] = BC[j][1]
                index += 1

    print(sum(A))


if __name__ == '__main__':
    main()


### FIXED CODE ###


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

    BC.sort(key=lambda x: x[1], reverse=True)
    A.sort()
    index = 0
    for j in range(M):
        if index >= N:
            break
        elif A[index] > BC[j][1]:
            break
        for i in range(BC[j][0]):
            if index >= N:
                break
            elif A[index] < BC[j][1]:
                A[index] = BC[j][1]
                index += 1

    print(sum(A))


if __name__ == '__main__':
    main()
n = int(input())
a = list(map(int, input().split()))
q = int(input())
numl = [0] * 100000
suma = sum(a)
for i in range(n):
    numl[a[i]]+=1
for i in range(q):
    b, c = map(int, input().split())
    bn = numl[b]
    suma += (c - b)* bn
    print(suma)
    numl[c] += bn

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
q = int(input())
numl = [0] * 100005
resl = []
suma = sum(a)
for i in range(n):
    numl[a[i]]+=1
for i in range(q):
    b, c = map(int, input().split())
    bn = numl[b]
    suma += (c - b)* bn
    resl.append(suma)
    numl[b] -= bn
    numl[c] += bn
for i in resl:
    print(i)
import copy
s = input()
x,y = map(int,input().split())

ver = []
hor = []
ini = 0
flag = 'h1'
tmp = 0

for i in range(len(s)):
    if s[i] == 'T':
        if flag == 'h':
            if tmp > 0:
                hor.append(tmp)
            tmp = 0
            flag = 'v'
        elif flag == 'v':
            if tmp > 0:
                ver.append(tmp)
            flag = 'h'
            tmp = 0
        elif flag == 'h1':
            if tmp > 0:
                ini = tmp
            flag = 'v'
            tmp = 0
    else:
        tmp += 1

if tmp > 0:
    if flag == 'h1':
        ini = tmp
    elif flag == 'h':
        hor.append(tmp)
    elif flag == 'v':
        ver.append(tmp)
        
ver_li = [0]*(8000*2+1)
hor_li = [0]*(8000*2+1)

hor_li[8000+ini] = 1
c_hor = copy.deepcopy(hor_li)
for i in range(len(hor)):
    #c_hor = copy.deepcopy(hor_li)
    for j in range(8000*2+1):
        if hor_li[j] == 1:
            #print(hor[i])
            c_hor[hor[i]] = 0
            c_hor[j+hor[i]] = 1
            c_hor[j-hor[i]] = 1
    hor_li = c_hor

ver_li[8000] = 1
c_ver = copy.deepcopy(ver_li)
for i in range(len(ver)):
    #c_ver = copy.deepcopy(ver_li)
    for j in range(8000*2+1):
        if ver_li[j] == 1:
            c_ver[ver[i]] = 0
            #print(hor[i])
            c_ver[j+ver[i]] = 1
            c_ver[j-ver[i]] = 1
    ver_li = c_ver
    
if hor_li[8000+x] == 1 and ver_li[8000+y] == 1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

import copy
s = input()
x,y = map(int,input().split())

ver = []
hor = []
ini = 0
flag = 'h1'
tmp = 0

for i in range(len(s)):
    if s[i] == 'T':
        if flag == 'h':
            if tmp > 0:
                hor.append(tmp)
            tmp = 0
            flag = 'v'
        elif flag == 'v':
            if tmp > 0:
                ver.append(tmp)
            flag = 'h'
            tmp = 0
        elif flag == 'h1':
            if tmp > 0:
                ini = tmp
            flag = 'v'
            tmp = 0
    else:
        tmp += 1

if tmp > 0:
    if flag == 'h1':
        ini = tmp
    elif flag == 'h':
        hor.append(tmp)
    elif flag == 'v':
        ver.append(tmp)

num = 8000
        
ver_li = [[0 for i in range(2)] for j in range(num*2+1)]
hor_li = [[0 for i in range(2)] for j in range(num*2+1)]

hor_li[num+ini][0] = 1
#print(sum(hor))
#exit()

for i in range(len(hor)):
    #c_hor = copy.deepcopy(hor_li)
    for j in range(num*2+1):
        if hor_li[j][0] == 1:
            #print(j,hor[i],i)
            hor_li[j][1] = 0
            hor_li[j+hor[i]][1] = 1
            hor_li[j-hor[i]][1] = 1
    for j in range(num*2+1):
        hor_li[j][0] = hor_li[j][1]

ver_li[num][0] = 1
for i in range(len(ver)):
    #c_ver = copy.deepcopy(ver_li)
    for j in range(num*2+1):
        if ver_li[j][0] == 1:
            ver_li[j][1] = 0
            #print(hor[i])
            ver_li[j+ver[i]][1] = 1
            ver_li[j-ver[i]][1] = 1
    for j in range(num*2+1):
        ver_li[j][0] = ver_li[j][1]
    
if hor_li[num+x][0] == 1 and ver_li[num+y][0] == 1:
    print('Yes')
else:
    print('No')
a,b = map(lambda x: int(x) for x in input().split())

print(max(a+b, a-b, a*b))

### FIXED CODE ###

a,b = map(lambda x: int(x), input().split())

print(max(a+b, a-b, a*b))
s = input()
if s[2] == s[3] AND s[4] == s[5];
	print("Yes")
else print("No");

### FIXED CODE ###


s=input()
print("Yes" if s[2]==s[3] and s[4]==s[5] else "No")
import sys,math
for i in sys.stdin.realines():
	if not i.strip():break
	a,b=map(int,i.split())
	print int(math.log10(a+b))+1

### FIXED CODE ###

import sys
for s in sys.stdin:print len(str(sum(map(int,s.split()))))
import sys

input=sys.stdin.readline

N=int(input())
A=[-1]*N;B=[-1]*N
for i in range(N):
    A[i],B[i]=map(int,input().split())

ans=min(sum(A),sum(B))

temp=[(A[i],i) for i in range(N)]+[(B[i],i) for i in range(N)]
temp.sort()
data=[0]*N
for i in range(N):
    val,id=temp[i]
    data[id]+=1
S=sum(temp[i][0] for i in range(N))

for i in range(N):
    if data[i]==2:
        test=S
    elif data[i]==1:
        if temp[N-1][1]!=i:
            test=S+max(A[i],B[i])-temp[N-1][0]
        else:
            test=S+max(A[i],B[i])-temp[N-2][0]
    ans=min(test,ans)

print(ans)


### FIXED CODE ###

import sys,random

input=sys.stdin.readline

N=int(input())
A=[-1]*N;B=[-1]*N
for i in range(N):
    A[i],B[i]=map(int,input().split())

ans=min(sum(A),sum(B))

temp=[(A[i],i) for i in range(N)]+[(B[i],i) for i in range(N)]
temp.sort()
#print(temp)
data=[0]*N
for i in range(N):
    val,id=temp[i]
    data[id]+=1
S=sum(temp[i][0] for i in range(N))

for i in range(N):
    if data[i]==2:
        test=S
        ans=min(ans,test)
    elif data[i]==1:
        if temp[N-1][1]!=i:
            test=S+max(A[i],B[i])-temp[N-1][0]
        else:
            test=S+max(A[i],B[i])-temp[N-2][0]
        ans=min(ans,test)

print(ans)
import math
import sympy
import sys

n = int(input())

if n == 1:
    print(0)
    sys.exit()

yakusu = set(sympy.divisors(n))
yakusu.discard(1)

sosu = set([min(yakusu)])
tansaku = set(yakusu)
kari = set(tansaku)



while len(tansaku) > 0:
    for var in tansaku:
        if var % max(sosu) == 0:
            kari.discard(var)
    tansaku = set(kari)
    if len(tansaku) == 0:
        break
    sosu.add(min(tansaku))
sosu = sosu | tansaku

i = 1
j = 0
kari = set(sosu)

while n != 1:
    for var in sosu:
        if n % (var ** i) == 0:
            n = n / (var ** i)
            j += 1
        else:
            kari.discard(var)
    sosu = set(kari)

    i += 1
    if i > 1000:
        break

print(j)


### FIXED CODE ###

import math
import sys

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())

if n <= 1:
    print(0)
    sys.exit()

yakusu = set(make_divisors(n))
yakusu.discard(1)

sosu = set([min(yakusu)])
tansaku = set(yakusu)
kari = set(tansaku)



while 1:
    for var in tansaku:
        if var % max(sosu) == 0:
            kari.discard(var)
    tansaku = set(kari)
    if len(tansaku) == 0:
        break
    sosu.add(min(tansaku))
sosu = sosu | tansaku

i = 1
j = 0
kari = set(sosu)

while n != 1:
    for var in sosu:
        if n % (var ** i) == 0:
            n = n / (var ** i)
            j += 1
        else:
            kari.discard(var)
    sosu = set(kari)

    i += 1
    if i > 1000:
        break

print(j)
k = int(input())
l = ['1','2','3','4','5','6','7','8','9']
lf = ['1','2','3','4','5','6','7','8','9']
sum = 9
while sum < k:
    lff = []
    for i in lf:
        if i[-1] == [0]:
            lff.append(i+'0')
            lff.append(i+'1')
        elif i[-1] == [9]:
            lff.append(i+'8')
            lff.append(i+'9')
        else:
            lff.append(i+str(int(i[-1]-1)))
            lff.append(i+str(int(i[-1])))
            lff.append(i+str(int(i[-1]+1)))
    lf = lff
    l += lff
print(l[k-1])

### FIXED CODE ###

k = int(input())
l = ['1','2','3','4','5','6','7','8','9']
lf = ['1','2','3','4','5','6','7','8','9']
sum = 9
while sum < k:
    lff = []
    for i in lf:
        if i[-1] == '0':
            lff.append(i+'0')
            lff.append(i+'1')
        elif i[-1] == '9':
            lff.append(i+'8')
            lff.append(i+'9')
        else:
            lff.append(i+str(int(i[-1])-1))
            lff.append(i+str(int(i[-1])))
            lff.append(i+str(int(i[-1])+1))
    lf = lff
    l += lff
    sum += len(lff)
print(int(l[k-1]))
count = 0
a,b,c = map(int,input().split())
for i in range(a,b+1)
	if c%i==0:
		count+=1
print(count)

### FIXED CODE ###

count = 0
a,b,c = map(int,input().split())
for i in range(a,b+1):
	if c%i==0:
		count+=1
print(count)
N = int(input())
A = list(map(int,input().split()))
A.sort()

xy = [0]*N-1
idx = 0

for i in range(N-1):
    if A[-2] > 0:
        y = A.pop()
        x = A[0]

        xy[idx] = [x,y]

        A[0] = x-y

    else:
        x = A.pop()
        y = A.pop(0)

        xy[idx] = [x,y]

        A.append(x-y)
    
    idx += 1

print(A[0])
for x, y in xy:
    print(x,y)

### FIXED CODE ###

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

xy = [0]*(N-1)
idx = 0

n = A.pop()

for i in range(N-1):
    a = A.pop()
    if a > 0:
        xy[idx] = [A[0], a]
        A[0] -= a
    else:
        xy[idx] = [n, a]
        n -= a
        idx += 1
        for j in A:
            xy[idx] = [n, j]
            n -= j
            idx += 1
        break

    idx += 1

print(n)
for x, y in xy:
    print(x,y)
S = input()
z_count = 0
o_count = 0
k_count = 0
g_count = 0
for i in range(len(S)):
  if S[i] == "0":
    z_count += 1
    if i % 2 == 0:
      g_count += 1
    else:
      k_count += 1
  else:
    o_count += 1
    if i % 2 == 0:
      g_count += 1
    else:
      k_count += 1
    
if z_count <= o_count:
  if g_count <= k_count:
    print(len(S) - g_count)
  else:
    print(len(s) - k_count)
    
else:
  if g_count <= 

### FIXED CODE ###

S = input()
ans = len(S)

for i in range(2):
  cnt = 0
  for j in range(len(S)):
    if j % 2 == 0 and S[j] != str(i):
      cnt += 1
    if j % 2 == 1 and S[j] == str(i):
      cnt += 1
  ans = min(ans, cnt)
print(ans)
from collections import Counter
import numpy as np
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
    ans = ans+((c-b)*v)
    print(ans)


### FIXED CODE ###

from collections import Counter
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
ans = sum(A)
A = Counter(A)
bc = [tuple(map(int, input().split())) for i in range(Q)]
for b, c in bc:
    v = A.pop(b, None)
    if v:
        A[c] += v
        ans = ans+((c-b)*v)
    print(ans)
a, b = map(int, raw_input().split())
s = 1
for i in range(a, b + 1):
    s *= i
if s == 0:
    print 'Zero'
else:
    print ['Negative', 'Positive'][s > 0]


### FIXED CODE ###

a, b = map(int, raw_input().split())
if a * b < 0:
    print 'Zero'
elif a + b < 0 and abs(a - b) & 1 == 0:
    print 'Negative'
else:
    print 'Positive'
from functools import lru_cache
def sub():
    N, M = [int(e) for e in input().split()]
    As = [e for e in input().split()]

    d_cost = {
            "1": 2,
            "2": 5,
            "3": 5,
            "4": 4,
            "5": 5,
            "6": 6,
            "7": 3,
            "8": 7,
            "9": 6,
            }
    
    
    NINF = -10**9
    @lru_cache(maxsize=None)   
    def dp(a_life):
        if a_life == 0:
            return 0
        cc = [a_life - d_cost[a] for a in As]
        cc = [c for c in cc if c >= 0]
        if len(cc) == 0:
            return NINF
        buf = [dp(c) + 1 for c in cc]
        return max(buf)
    
    Lmax = dp(N)
    
    life = N
    buf = []
    for i in range(Lmax):
        oks = [a for a in As if dp(life - d_cost[a]) == dp(life) - 1 and life - d_cost[a] >= 0]
        a_selected = max(oks)
        buf.append(a_selected)
        life = life - d_cost[a_selected]
    print("".join(buf))


sub()






### FIXED CODE ###

def sub(N, M, As):

    d_cost = {
            "1": 2,
            "2": 5,
            "3": 5,
            "4": 4,
            "5": 5,
            "6": 6,
            "7": 3,
            "8": 7,
            "9": 6,
            }
    
    NINF = -10**6
    dp_table = [NINF for _ in range(N+1)]
    dp_table[0] = 0
    for i in range(N):
        if dp_table[i] < 0:
            continue
        for a in As:
            cost = i + d_cost[a]
            if cost <= N:
                dp_table[cost] = max(dp_table[cost], dp_table[i] + 1)

    Lmax = dp_table[N]

    life = N
    buf = []
    for i in range(Lmax):
        oks = []
        for a in As:
            if life - d_cost[a] < 0:
                continue
            if dp_table[life - d_cost[a]] == dp_table[life] - 1:
                oks.append(a)
        # oks = [a for a in As if dp_table[life - d_cost[a]] == dp_table[life] - 1 and life - d_cost[a] >= 0]
        a_selected = max(oks)
        buf.append(a_selected)
        life = life - d_cost[a_selected]
    print("".join(buf))
            

if __name__ == "__main__":
    N, M = [int(e) for e in input().split()]
    As = [e for e in input().split()]
    sub(N, M, As)
s=input()

def check(s):
    if len(s)==2:return []
    ans=[]
    for i in range(2,len(s)):
        if s[i-2]!=s[i]:ans.append(i-1)
    return ans

def result(limit):
    if limit%2==1:return 'Second'
    if limit%2==0:return 'First'

def go(s,now,limit,past,prev):
    if prev==0:branch[now]=check(s)
    if branch[now]==[]:
        if now==1 and prev!=0:print(result(limit))
        elif now==1 and prev==0:print('Second')
        elif now==2:print('First')
        else:go(past[now-2],now-2,now,past[:-2],1)
    else:
        if now+1==limit:go(past[now-1],now-1,limit,past[:-1],1)
        else:
            x=branch[now].pop()
            s=s[:x]+s[x+1:]
            past+=(s,)
            go(s,now+1,limit,past,0)

def calc(s):
    data=[0 for i in range(len(s))]
    log = {}
    for i in range(len(s)):
        if s[i] in log:
            for j in range(log[s[i]]+1,i):
                data[j]+=1
            log[s[i]]=i
        elif s[i] not in log:
            log[s[i]]=i
    return data


def first(s,first_limit):
    first_branch=check(s)
    if first_branch==[]:
        if first_limit==1:return first_limit+1
        else: return first_limit
    data=calc(s)
    data_can=[]
    for i in range(len(data)):
        if i in first_branch:
            data_can.append(data[i])
        else:data_can.append(0)
    x=data_can[1:-1].index(max(data_can))
    s=s[:x]+s[x+1:]
    first_limit+=1
    return first(s,first_limit)
            
branch={}
branch[1]=check(s)
past=(s,)
now=1
limit=first(s,1)
go(s,now,limit,past,0)

### FIXED CODE ###

s=input()
def result(limit):
    if limit%2==1:return 'First'
    if limit%2==0:return 'Second'
first=s[0]
last=s[-1]
if first!=last:
    first_idx=[]
    last_idx=[]
    for x in range(s.count(first)):
        first_idx.append(s.index(first,x))
    for y in range(s.count(last)):
        last_idx.append(s.index(last,y))
    judge=0
    data=[]
    data.append(last_idx.pop())
    while judge<2:
        if judge==0:
            while judge==0:
                if len(first_idx)==0:judge=2
                else:
                    k=first_idx.pop()
                    if k<data[-1]:
                        judge=1
                        data.append(k)
                    
        elif judge==1:
            while judge==1:
                if len(last_idx)==0:judge=2
                else:
                    k=last_idx.pop()
                    if k<data[-1]:
                        judge=0
                        data.append(k)
        
    print(result(len(s)-len(data)))

elif first==last:
    first_idx=[]
    for x in range(s.count(first)):
        first_idx.append(s.index(first,x))
    
    alpha='abcdefghijklmnopqrstuvwxyz'
    counter=[0 for _ in range(len(alpha))]
    for i in range(1,len(first_idx)):
        string=s[first_idx[i-1]+1:first_idx[i]]
        for j in range(len(alpha)):
            if alpha[j] in string:counter[j]+=1
    k = max(counter)
    print(result(len(s)-2*k-1))
import heapq
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
x_range = []
cut = [0]
count = 0
for i in range(m-1):
    x_range.append(abs(x[i]-x[i+1]))
h = heapq.nlargest(n-1,x_range)


for i in h:
    cut.append(x_range.index(i)+1)
cut.append(len(x))


for i in range(len(cut)-1):
    sum_range = x[cut[i]:cut[i+1]]
    print(1)
    count += abs(sum_range[0]-sum_range[len(sum_range)-1])
#print(count)


### FIXED CODE ###

n,m = map(int,input().split())
x = list(map(int,input().split()))
dist = []
x.sort()
if n > m:
    print(0)
else:
    for i in range(m-1):
        dist.append(x[i+1] -x[i])
    dist.sort()
    print(sum(dist[:m-n]))
lenght = int(input())

x = list(map(int,input().split()))

でf

first_val = x[0]
for i in range(lenght-1):
  first_val *= x[i+1]

if first_val > 1e18:
  first_val = -1

print(first_val)

### FIXED CODE ###

x = list(map(int,input().split()))
result = x[0]*x[1]
print(result)