Harryxun/stf_run huggingface dataset:
def col(i):
    for x in G[i]:
        if x in hist and hist[x]==0:
            hist[x]=1
            col(x)
N,M = map(int,input().split())
G = {}
for _ in range(M):
    x,y,z = map(int,input().split())
    if x not in G:
        G[x]=[]
    G[x].append(y)
    if y not in G:
        G[y]=[]
    G[y].append(x)
cnt = N-len(G)
while G:
    hist = {i:0 for i in G.keys()}
    s = list(G.keys())[0]
    hist[s]=1
    col(s)
    for i in hist.keys():
        if hist[i]==1:
            del G[i]
    cnt += 1
print(cnt)

### FIXED CODE ###

def rt(i):
    while i!=G[i][0]:
        i = G[i][0]
    return i
N,M = map(int,input().split())
G = {i:[i,1] for i in range(1,N+1)}
for _ in range(M):
    X,Y,Z = map(int,input().split())
    rx = rt(X)
    ry = rt(Y)
    if rx!=ry:
        if G[rx][1]>=G[ry][1]:
            G[ry][0] = rx
            G[rx][1] += G[ry][1]
        else:
            G[rx][0] = ry
            G[ry][1] += G[rx][1]
cnt = 0
A = []
for i in range(1,N+1):
    A.append(rt(i))
A = list(set(A))
print(len(A))
c,d=map(int,input().split())

if a>b:
 print(a-1)
else:
 print(a)

### FIXED CODE ###

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

if a<=b:
    print(a)
else:
    print(a-1)
import math
a,b=map(int,input().split())
flag=True
for i in range(10**6):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print(-1)

### FIXED CODE ###

s=input()
if s[0]==s[1]==s[2]:
    print("No")
else:
    print("Yes")
N, M = map(int, input("").split(" "))

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

potentials = []
for i in range(M):
    B, C = map(int, input("").split(" "))

    potentials.append((B, C))

potentials.sort(key=lambda x: x[1], reverse=True)

c = 0
for p in potentials:
    for b in range(p[0]):
        if p[1] > A[c]:
            if c < len(A):
                A[c] = p[1]
                c += 1
            else:
                break
        else:
            break

print(sum(A))

### FIXED CODE ###

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

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

potentials = []
for i in range(M):
    B, C = map(int, input("").split(" "))

    potentials.append((B, C))

potentials.sort(key=lambda x: x[1], reverse=True)

c = 0
for p in potentials:
    for b in range(p[0]):
        if p[1] > A[c]:
            A[c] = p[1]
            c += 1
            if c >= len(A):
                break
        else:
            break
    if c >= len(A):
        break

print(sum(A))
#!/usr/bin/env python3
import sys


def solve(N: int, M: int, s: "List[int]", c: "List[int]"):
    sc=[]
    for i in range(M):
        sc.append([s[i],c[i]])
    sc=list(map(list,set(map(tuple,sc))))
    sc.sort()
    for i in range(len(sc)-1):
        if sc[i][0]==sc[i+1][0]:
            print(-1)
            exit()
    if N>max(set(s)):
        print(-1)
        exit()
    a=[0]*N
    for i in range(len(s)):
        a[s[i]-1]=c[i]
    print("".join(map(str,a)))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    s = [int()] * (M)  # type: "List[int]"
    c = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        s[i] = int(next(tokens))
        c[i] = int(next(tokens))
    solve(N, M, s, c)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, M: int, s: "List[int]", c: "List[int]"):
    sc=[]
    for i in range(M):
        sc.append([s[i],c[i]])
    sc=list(map(list,set(map(tuple,sc))))
    sc.sort()
    for i in range(len(sc)):
        if sc[i][0]==1 and sc[i][1]==0 and not N==1:
            print(-1)
            exit()
    if M==0 and N==1:
        print(0)
        exit()
    if M==0 or len(sc)==1 and c[0]==0 and not s[0]==1:
        q=[1]
        for i in range(N-1):
            q.append(0)
        print("".join(map(str,q)))
        exit()
    for i in range(len(sc)-1):
        if sc[i][0]==sc[i+1][0]:
            print(-1)
            exit()
    #if N>max(set(s)):
    #    print(-1)
    #    exit()
    a=[0]*N
    for i in range(len(s)):
        a[s[i]-1]=c[i]
    if a[0]==0 and not N==1:
        a[0]=1
    print("".join(map(str,a)))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    s = [int()] * (M)  # type: "List[int]"
    c = [int()] * (M)  # type: "List[int]"
    for i in range(M):
        s[i] = int(next(tokens))
        c[i] = int(next(tokens))
    solve(N, M, s, c)

if __name__ == '__main__':
    main()
import numpy as np
K, N = map(int, input().split())
A = input().split()
diff = np.append(np.array(A[1:]) - np.array(A[:-1]), K - A[-1])
diff = np.delete(diff, np.argmax(diff))
print(diff.sum())

### FIXED CODE ###

import numpy as np
K, N = map(int, input().split())
A = np.array(list(map(int, input().split())))
diff = np.append(A[1:] - A[:-1], K + A[0] - A[-1])
print(np.delete(diff, np.argmax(diff)).sum())
n = int(input())

sayTable = []
for i in range(n):
	a = int(input())
	
	sayArray = []
	for j in range(a):
		x, y = [int(v) for v in input().split()]
		sayArray.append((x-1, y+1))
	sayTable.append(sayArray)

def count(honest):
	count = 0
	for v in honest:
		if v == 2:
			count += 1
	return count

def checkHonest(sayArray, honest):
	for x, y in sayArray:
		if y == 2 and honest[x] != 2:
			return False
	return True

def checkHonestAll(sayTable, honest):
	for i in range(n):
		h = honest[i]
		if h != 2:
			continue
		for x, y in sayArray:
		if honest[x] != y:
			return False
	return True

def setHonest(sayArray, honest):
	for x, y in sayArray:
		honest[x] = y

def search(sayTable, honest, i):
	if i >= n;
		if checkHonestAll(sayTable, honest):
			return count(honest)
		else:
			return 0

	count = 0
	h = honest[i]
	if (h == 0 or h == 2) and checkHonest(sayTable, honest):
		copyHonest = honest[:]
		setHonest(copyHonest, sayTable[i])
		copyHonest[i] = 2
		c = search(sayTable, copyHonest, i + 1)
		if count < c:
			count = c

	honest[i] = 1
	c = search(sayTable, honest, i+1)
		if count < c:
			count = c
	return count

print(search(sayTable, [0] * n, 0));



### FIXED CODE ###

n = int(input())

sayTable = []
for i in range(n):
	a = int(input())
	
	sayArray = []
	for j in range(a):
		x, y = [int(v) for v in input().split()]
		sayArray.append((x-1, y+1))
	sayTable.append(sayArray)

def countHonest(honest):
	count = 0
	for v in honest:
		if v == 2:
			count += 1
	return count

def checkHonest(sayArray, honest):
	for x, y in sayArray:
		if honest[x] == 0:
				continue
		if y == 2 and honest[x] != 2:
			return False
	return True

def checkHonestAll(sayTable, honest):
	for i in range(n):
		h = honest[i]
		if h != 2:
			continue
		sayArray = sayTable[i]
		for x, y in sayArray:
			if y != honest[x]:
				return False
	return True

def setHonest(sayArray, honest):
	for x, y in sayArray:
		honest[x] = y

def search(sayTable, honest, i):
	if i >= n:
		if checkHonestAll(sayTable, honest):
			return countHonest(honest)
		else:
			return 0

	count = 0
	h = honest[i]
	sayArray = sayTable[i]
	if (h == 0 or h == 2) and checkHonest(sayArray, honest):
		copyHonest = honest[:]
		setHonest(sayArray, copyHonest)
		copyHonest[i] = 2
		c = search(sayTable, copyHonest, i+1)
		if count < c:
			count = c

	honest[i] = 1
	c = search(sayTable, honest, i+1)
	if count < c:
		count = c
	return count

print(search(sayTable, [0] * n, 0))
# Recursive function to return gcd of a and b 
def gcd(a,b): 
	
	# Everything divides 0 
	if (a == 0): 
		return b 
	if (b == 0): 
		return a 

	# base case 
	if (a == b): 
		return a 

	# a is greater 
	if (a > b): 
		return gcd(a-b, b) 
	return gcd(a, b-a) 

#from math import gcd
a,b,c,d=map(int,input().split(' '))
r1=b-b%c
if a%c!=0:
	l1=a-a%c+c
else:
	l1=a
r2=b-b%d
if a%d!=0:
	l2=a-a%d+d
else:
	l2=a

lcm=(c*d)//gcd(c,d)
r3=b-b%lcm
if a%lcm!=0:
	l3=a-a%lcm+lcm
else:
	l3=a
nc=(r1-l1+c)//c
nd=(r2-l2+d)//d
nlcm=(r3-l3+lcm)//lcm
divi=nc+nd-nlcm
out=b-a+1
if c>a and c>b and d>a and d>b:
	print(0)
else:
	print(out-divi)




### FIXED CODE ###

from fractions import gcd
a,b,c,d=map(int,input().split(' '))
r1=b-b%c
if a%c!=0:
	l1=a-a%c+c
else:
	l1=a
r2=b-b%d
if a%d!=0:
	l2=a-a%d+d
else:
	l2=a
lcm=(c*d)//gcd(c,d)
r3=b-b%lcm
if a%lcm!=0:
	l3=a-a%lcm+lcm
else:
	l3=a
nc=(r1-l1+c)//c
nd=(r2-l2+d)//d
nlcm=(r3-l3+lcm)//lcm
divi=nc+nd-nlcm
out=b-a+1
if c>a and c>b and d>a and d>b:
	print(0)
else:
	print(out-divi)
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	#k番目の値をxに更新
	def update(self, k, x):
		k += self.N0 - 1
		self.data[k] = x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N

	ans = [0] * N
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort(key = lambda x:x[0])
	Seg = SegmentTree(N)
	right = 0
	for r, l, i in LR:
		while right <= r:
			if lastappeared[c[right] - 1] == None:
				Seg.update(right, 1)
			else:
				Seg.update(lastappeared[c[right] - 1], 0)
				Seg.update(right, 1)
			lastappeared[c[right] - 1] = right
			right += 1

		if l == 0:
			anspre = Seg.query(0, r)
		else:
			anspre = Seg.query(l, r)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	#k番目の値をxに更新
	def update(self, k, x):
		k += self.N0 - 1
		self.data[k] = x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N

	ans = [0] * Q
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort(key = lambda x:x[0])
	Seg = SegmentTree(N)
	right = 0
	for r, l, i in LR:
		while right <= r:
			itr = c[right] - 1
			if lastappeared[itr] == None:
				Seg.update(right, 1)
			else:
				Seg.update(lastappeared[itr], 0)
				Seg.update(right, 1)
			lastappeared[itr] = right
			right += 1

		if l == 0:
			anspre = Seg.query(0, r)
		else:
			anspre = Seg.query(l, r)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()
N = int(input())
A = []
for i in range(0,N):
  B = int(input())
  A.append(B)

sum1 = float(1/A[0])

for i in range(0,N-1):
  sum1 = sum1 + 1/A[i+1]

result = 1/sum1
print(result)

### FIXED CODE ###

try:
    N = int(input())
    if N>0 or N<=100:
        S = input()
        A = S.split()
        A = list(map(int, A)) 
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)

except:
        print("Error")
M = (10**9+7)
s = list(input())[::-1]

mo = []
fixed = 0
for i in range(len(s)):
  if s[i]!='?':
    t = int(s[i])
    fixed += (t*pow(10,i,13))%13
  else:
    t = []
    for j in range(10):
      t.append((j*pow(10,i,13)%13))
    mo.append(tuple(t))
    
dp = [[-1]*13 for _ in range(len(mo))]

for m in mo[0]:
  dp[0][m] = 1
for i in range(len(mo)-1):
  for j in range(13):
    if dp[i][j]==-1:
      continue
    for m in mo[i+1]:
      p = (j+m)%13
      if dp[i+1][p] == -1:
        dp[i+1][p] = dp[i][j] % M
      else:
        dp[i+1][p] += dp[i][j] 

ans = dp[-1][(18-fixed)%13] % M 
if dp[-1][(18-fixed)%13] == -1:
  print(0)
  exit()
print(ans)

### FIXED CODE ###

M = (10**9+7)
s = list(input())[::-1]

mo = []
fixed = 0
for i in range(len(s)):
  if s[i]!='?':
    t = int(s[i])
    fixed += (t*pow(10,i,13))
    fixed %= 13
  else:
    t = []
    for j in range(10):
      t.append((j*pow(10,i,13)%13))
    mo.append(tuple(t))

if len(mo)==0:
  if fixed == 5:
    print(1)
  else:
    print(0)
  exit()
  
dp = [[-1]*13 for _ in range(len(mo))]

for m in mo[0]:
  dp[0][m] = 1
for i in range(len(mo)-1):
  for j in range(13):
    if dp[i][j]==-1:
      continue
    dp_i = dp[i+1]
    dp_j = dp[i]
    for m in mo[i+1]:
      p = (j+m)%13
      if dp_i[p] == -1:
        dp_i[p] = 0
      dp_i[p] += dp_j[j]
      dp_i[p]  %= M

ans = dp[-1][(18-fixed)%13] % M 
if dp[-1][(18-fixed)%13] == -1:
  print(0)
  exit()
print(ans)
print(-(-(N-1)//(K-1)))

### FIXED CODE ###

N,K = map(int, input().split())
print(-(-(N-1)//(K-1)))
N,M = map(int,input().split())
pre_a = -1
k = []
ef = True
for i in range(M):
    a = int(input())
    if (a-pre_a == 1):break
    k.append(a-pre_a-2)
    pre_a = a
else:
    ef = False
    k.append(N-a-1)
nk = sorted(k)
def org_fib(t):
    t1 = 1
    t2 = 2
    fib = 0
    if t == 1:
        return t1
    elif t == 2:
        return t2
    else:
        for _ in range(t-2):
            fib = t1+t2
            t1 = t2
            t2 = fib
    return fib

if ef:print(0)
else:
    g = 1
    for nnkk in nk:
        if nnkk == 0:
            pass
        else:
            g = (g * org_fib(nnkk)) % 1000000007
    print(g)

### FIXED CODE ###

def org_fib(t):
    t1 = 1
    t2 = 2
    fib = 0
    if t == 1:
        return t1
    elif t == 2:
        return t2
    else:
        for _ in range(t-2):
            fib = t1+t2
            t1 = t2
            t2 = fib
    return fib % 1000000007

N,M = map(int,input().split())
if N == 1:
    print(1)
elif M == 0:
    print(org_fib(N))
else:
    pre_a = -1
    k = []
    ef = True
    for i in range(M):
        a = int(input())
        if (a-pre_a == 1):break
        k.append(a-pre_a-2)
        pre_a = a
    else:
        ef = False
        k.append(N-a-1)

    if ef:print(0)
    else:
        g = 1
        for kk in k:
            if kk == 0:pass
            else:g = (g * org_fib(kk)) % 1000000007
        print(g)
num = input().split()
k = int(num[0])
x = int(num[1])
ans = []
for i in range(x - k + 1, x + k):
    ans.append(i)
print(ans)
s

### FIXED CODE ###

num = input().split()
k = int(num[0])
x = int(num[1])
ans = []
for i in range(x - k + 1, x + k):
    print(i)
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j1]<A[0]:
  j1+=1
k1=0
while C[k1]<B[j1]:
  k1+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      while k1<N and B[j]>C[k1]:
        k1+=1
      kinds+=(N-k1)
      k1=k1-1
print(kinds)


### FIXED CODE ###

import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)
s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)


### FIXED CODE ###

s = input()
h, w = map(int, s.split())
a = [list(map(int, input().split())) for i in range(h)]
b = [[[-1,-1]]*w for i in range(h)]
for i in range(h):
    for j in range(w):
        a[i][j] %= 2
count = 0
for i in range(h-1):
    for j in range(w):
        if a[i][j] == 1:
            a[i][j] = 0
            a[i+1][j] = (a[i+1][j]+1)%2
            b[i][j] = [i+1, j]
            count += 1
for i in range(w-1):
    if a[h-1][i] == 1:
        a[h-1][i] = 0
        a[h-1][i+1] = (a[h-1][i+1]+1)%2
        b[h-1][i] = [h-1, i+1]
        count += 1
print(count)
for i in range(h):
    for j in range(w):
        if not b[i][j] == [-1,-1]:
            print(i+1, j+1, b[i][j][0]+1, b[i][j][1]+1)
while True:
  w=int(input())
  if w<=48:
   judge='light fly'
  elif 48<=w<=51:
   judge='fly'
  elif 51<=w<=54:
   judge='bantam'
  elif 54<=w<=57:
   judge='feather'
  elif 57<=w<=60:
   judge='light'
  elif 60<=w<=64:
   judge='light welter'
  elif 64<=w<=69:
   judge='welter'
  elif 69<=w<=75:
   judge='light middle'
  elif 75<=w<=81:
   judge='middle'
  elif 81<=w<=91:
   judge='light heavy'
  elif w>91:
   judge='heavy'  
  print(judge)

### FIXED CODE ###

while True:
  try:
   w=float(input())
   if w<=48:
    judge='light fly'
   elif 48<=w<=51:
    judge='fly'
   elif 51<=w<=54:
    judge='bantam'
   elif 54<=w<=57:
    judge='feather'
   elif 57<=w<=60:
    judge='light'
   elif 60<=w<=64:
    judge='light welter'
   elif 64<=w<=69:
    judge='welter'
   elif 69<=w<=75:
    judge='light middle'
   elif 75<=w<=81:
    judge='middle'
   elif 81<=w<=91:
    judge='light heavy'
   else:
    judge='heavy'  
   print(judge)
  except EOFError:
   break
yo,ans=map(int, input().split())
if yo<13:
    if yo>5:
        print(ans//)
    else:
        print(0)
else:
    print(ans)

### FIXED CODE ###

yo,ans=map(int, input().split())
if yo<13:
    if yo>5:
        print(ans//2)
    else:
        print(0)
else:
    print(ans)
import math

def get_lcm(x, y):
    return (x * y) // math.gcd(x, y)

def get_num(a, lcm):
    return lcm // a


N_str = input()
a_str = input()
a_str_list = a_str.split(" ")
# a_list = list(map(lambda x: int(x), a_str_list))
a_list = []
for a in a_str:
    a_list.append(int(a))
lcm = 1
for a in a_list:
    lcm = get_lcm(lcm, a)

sum_a = 0
for a in a_list:
    sum_a += get_num(a, lcm)

result = lcm / sum_a
print(result)


### FIXED CODE ###

import fractions

def get_lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def get_num(a, lcm):
    return lcm // a


N_str = input()
a_str = input()
a_str_list = a_str.split(" ")
a_list = list(map(lambda x: int(x), a_str_list))
lcm = 1
for a in a_list:
    lcm = get_lcm(lcm, a)

sum_a = 0
for a in a_list:
    sum_a += get_num(a, lcm)

result = lcm / sum_a
print(result)
from itertools import combinations

n,m,x = map(int,input().split())
cost_lists = [list(map(int,input().split())) for _ in range(n)]

# print(cost_lists)

min_cost = 10**9
unst_flag = False

for i in range(1, n+1):
    combi_lists = list(combinations(range(n), i))

    for combi_list in combi_lists:
        tmp_list = list()
        for j in range(1,m):
            tmp_unst = 0
            for k in combi_list:
                tmp_unst += cost_lists[k][j]

            tmp_list.append(tmp_unst)
        
        if min(tmp_list) >= x:
            tmp_cost = 0
            for k in combi_list:
                tmp_cost += cost_lists[k][0]

            min_cost = min(min_cost, tmp_cost)
            unst_flag = True

if unst_flag:
    print(min_cost)
else:
    print(-1)


### FIXED CODE ###

from itertools import combinations

n,m,x = map(int,input().split())
cost_lists = [list(map(int,input().split())) for _ in range(n)]

# print(cost_lists)

min_cost = 10**9
unst_flag = False

for i in range(1, n+1):
    combi_lists = list(combinations(range(n), i))

    for combi_list in combi_lists:
        tmp_list = list()
        for j in range(1,m+1):
            tmp_unst = 0
            for k in combi_list:
                tmp_unst += cost_lists[k][j]

            tmp_list.append(tmp_unst)
        
        if min(tmp_list) >= x:
            tmp_cost = 0
            for k in combi_list:
                tmp_cost += cost_lists[k][0]

            min_cost = min(min_cost, tmp_cost)
            unst_flag = True

if unst_flag:
    print(min_cost)
else:
    print(-1)
N = int(input())
l = list(map(int, input().split()))
l_2 = []
gusu_kisu = N % 2
end_F = 0
for i in range(N):
    if gusu_kisu == 1:
        An = l[i]
        if An % 2 == 1:
            end_F = 1
            break
        elif An == 0 and l_2.count(0) == 1:
            end_F = 1
            break
        elif l_2.count(An) == 2:
            end_F = 1
            break
        else:
            l_2.append(An)
    else:
        An = l[i]
        if An % 2 == 0:
            end_F = 1
            break
        elif l_2.count(An) == 2:
            end_F = 1
            break
        else:
            l_2.append(An)
#     print(An)
# print(end_F)
if end_F == 0:
    print((2 ** (N // 2)) % 1000000007)
else:
    print(0)

### FIXED CODE ###

c =input()
print(eval(c))
#include <bits/stdc++.h>
#include <unordered_map>
using namespace std;
#define rep(i, n) for ( int i = 0; i < n; ++i )
typedef long long ll ;


int main() {
  string n_str = 0;
  cin >> n_str ;
  if ( n_str[0] == n_str[2] ) puts( "Yes" ) ;
  else                        puts( "No" ) ;

  return 0 ;
}



### FIXED CODE ###

a, b, c = input()
print( "Yes" if a==c else "No" )