Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

A, B = map(int, input().split())

summary = A
for XORed in range(A+1, B+1):
    summary = summary ^ XORed

print(summary)

# def int2bin(x):
#     quotient = x
#     string_bin = ''
#     while(quotient != 1):
#         rest = quotient % 2
#         quotient = int((quotient - rest) / 2)
#         string_bin = str(rest) + string_bin
#     string_bin = '1' + string_bin
#     return int(string_bin)
#
# def bin2int(x):
#     power = int(len(str(x)) - 1)
#     integer = 0
#     i = 0
#     while(power >= 0):
#         integer += 2**power * int(str(x)[i])
#         i += 1
#         power -= 1
#     return integer


# divided_bin_str1 = str(int2bin(A))
# for divided in range(A+1, B+1):
#     added = ''
#     divided_bin_str2 = str(int2bin(divided))
#     if len(divided_bin_str1) < len(divided_bin_str2):
#         divided_bin_str1 = '0' + divided_bin_str1
#     else:
#         pass
#     # print(divided_bin_str1, divided_bin_str2)
#     for i in range(len(divided_bin_str1)):
#         ans = int(divided_bin_str1[i]) + int(divided_bin_str2[i])
#         if ans == 1:
#             added += '1'
#         else:
#             added += '0'
#     divided_bin_str1 = added
#
# added = int(added)
# ans = bin2int(added)
#
# print(ans)


### FIXED CODE ###

A, B = map(int, input().split())

# summary = A
# for XORed in range(A+1, B+1):
#     summary = summary ^ XORed

def XORfromZERO(x):
    rest = x % 2
    quotient = (x + rest) / 2
    if rest == 0:
        if quotient % 2 == 0:
            return 0 ^ x
        else:
            return 1 ^ x
    else:
        if quotient % 2 == 0:
            return 0
        else:
            return 1

print(XORfromZERO(A-1) ^ XORfromZERO(B))
### BUGGY CODE ###

x = int(input())

num = set()
for a in range(20):
    for b in range(20):
        for c in range(20):
            for d in range(20):
                for e in range(20):
                    for f in range(20):
                        num.add(
                            100 * a + 101 * b + 102 * c + 103 * d + 104 * e + 105 * f
                        )

# print(1 if x in num else 0)
if x < 100 or x > 2000:
    print(1)
elif x in num:
    print(1)
else:
    print(0)


### FIXED CODE ###

x = int(input())
dp = [0] * 100010
dp[100] = 1
dp[101] = 1
dp[102] = 1
dp[103] = 1
dp[104] = 1
dp[105] = 1

for i in range(106, 100010):
    if (
        dp[i - 100]
        or dp[i - 101]
        or dp[i - 102]
        or dp[i - 103]
        or dp[i - 104]
        or dp[i - 105]
    ):
        dp[i] = 1

print(1 if dp[x] else 0)
### BUGGY CODE ###

n=int(input())
a=list(map(int,input().split()))
def add(n):
    return n+1
cnt=0
li=[]
for i in range(n):
    cnt += li.count(a[i])
    li=list(map(add,li))
    li.append(1-a[i])
print(cnt)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
d={}
ans=0
for i in range(n):
    if i+a[i] in d.keys():
        d[i+a[i]]+=1
    else:
        d[i+a[i]]=1
    if i-a[i] in d.keys():
        ans+=d[i-a[i]]
print(ans)
### BUGGY CODE ###

N,K = map(int, input().split())
probability = 0


for x in range(N):
    bekicount = 0
    y = x
    while y < K:
        y = y*2
        bekicount = bekicount +1
    probability = probability + (x/N)*pow(0.5,bekicount)
    bekicount = 0
print(probability)

### FIXED CODE ###

N,K = map(int, input().split())
probability = 0


for x in range(1,N+1):
    bekicount = 0
    y = x
    while y < K:
        y = y*2
        bekicount = bekicount +1
    probability = probability + (1/N)*(pow(0.5,bekicount))
    bekicount = 0
print(probability)
### BUGGY CODE ###

N = int(input())
L = sorted(list(map(int, input().split())))
ans = 0
for i in range(N):
    for j in range(i + 1, N):
        for k in range(j + 1, N):
            if L[i] < L[j] + L[k] and L[j] < L[k] + L[i] and L[k] < L[i] + L[j]:
                ans += 1
print(ans)


### FIXED CODE ###

from bisect import bisect_left

n = int(input())
l = sorted(list(map(int, input().split())))
ans = 0

# a<b<c として、aとbを固定する
# 残る条件は c<a+b のみ
# aとbの固定方法がO(N^2), cの二分探索がO(logN)、結局O(N^2logN)
# 二分探索は事前にソートが必要

# ex. 2, 4(a), 4, 7(b), | 8, 9, 9 | (ここにa+b=11が挿入される), 12, 14
# cとして適切なのは8,9,9の3通り
# bisect_rightだとa+bが存在した時にバグる

for ai in range(n):
    for bi in range(ai + 1, n):
        ans += bisect_left(l, l[ai] + l[bi]) - bi - 1
print(ans)
### BUGGY CODE ###

# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意

n,A,B = [int(i) for i in readline().split()]
abc = [[int(i) for i in readline().split()] for j in range(n)]


res1 = []
res2 = []
eq = 10**9


def dfs(s,g,amari,yen,List):
    global eq
    if s != g:
        a,b,c = abc[s]
        if a*B == A*b:
            eq = min(eq,c)
            dfs(s+1,g,amari,yen,List)
        else: 
            dfs(s+1,g,amari+a*B-b*A,yen+c,List)
            dfs(s+1,g,amari        ,yen,List)
    else:
        if amari != 0:
            List.append((amari,yen))
        else:
            if yen != 0:
                eq = min(eq,yen)
        

dfs(0,n//2,0,0,res1)
dfs(n//2,n,0,0,res2)

#res1.sort()
res2.sort()
#print(res1)
#print(res2)


from bisect import *

ans = min(10**9,eq)

L = len(res2)
for amari,yen in res1:
    i = bisect(res2,(-amari,-10000000))
    if i < L and res2[i][0] == -amari:
        if 0 < yen+res2[i][1] < ans:
            ans = yen+res2[i][1]


if ans == 10**9:
    print(-1)
else:
    print(ans)






### FIXED CODE ###

# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline #文字列入力のときは注意

n,A,B = [int(i) for i in readline().split()]
abc = [[int(i) for i in readline().split()] for j in range(n)]


res1 = []
res2 = []
eq = 10**9

"""
def dfs(s,g,amari,yen,List):
    global eq
    if s != g:
        a,b,c = abc[s]
        if a*B == A*b:
            eq = min(eq,c)
            dfs(s+1,g,amari,yen,List)
        else: 
            dfs(s+1,g,amari+a*B-b*A,yen+c,List)
            dfs(s+1,g,amari        ,yen,List)
    else:
        if amari != 0:
            List.append((amari,yen))
        else:
            if yen != 0:
                eq = min(eq,yen)
        

dfs(0,n//2,0,0,res1)
dfs(n//2,n,0,0,res2)
"""

def dp(s,g):
    global eq
    d = {0:0}
    for i in range(s,g):
        nd = {}
        a,b,c = abc[i]
#        if a*B == A*b:
#            eq = min(eq,c)
#        else:
        for amari,yen in d.items():
            if amari in nd:
                nd[amari] = min(nd[amari],yen)
            else:
                nd[amari] = yen
            yen += c
            amari += a*B-b*A
            if amari == 0 and yen != 0:
                eq = min(eq,yen)
            elif amari in nd:
                nd[amari] = min(nd[amari],yen)
            else:
                nd[amari] = yen
        d = nd
#        print(d,nd)
    
    return list(d.items())


res1 = dp(0,n//2)
res2 = dp(n//2,n)


#res1.sort()
res2.sort()
#print(res1)
#print(res2)
#print(eq)

from bisect import *

ans = min(10**9,eq)

L = len(res2)
for amari,yen in res1:
    i = bisect(res2,(-amari,-10000000))
    if i < L and res2[i][0] == -amari:
        if 0 < yen+res2[i][1] < ans:
            ans = yen+res2[i][1]


if ans == 10**9:
    print(-1)
else:
    print(ans)
### BUGGY CODE ###

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

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y:
        while x%y:
            z = x%y
            x, y = y, x
        else:
            return z
    else:
        return y


x.append(X)
x.sort()
# print(x)
d = []
for i in range(N):
    d.append(x[i+1]-x[i])
# print(d)
for i in range(N):
    if i == 0:
        c = d[i]
    else:
        c = gcd(d[i], c)
print(c)


### FIXED CODE ###

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

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    # if x%y:
    #     while x%y:
    #         z = x%y
    #         x, y = y, x
    #     else:
    #         return z
    # else:
    #     return y
    if y == 0:
        return x
    else:
        return gcd(y, x%y)


x.append(X)
x.sort()
# print(x)
# d = []
# for i in range(N):
#     d.append(x[i+1]-x[i])
# print(d)
for i in range(N):
    if i == 0:
        c = x[i+1]-x[i]
    else:
        c = gcd(x[i+1]-x[i], c)
print(c)
### BUGGY CODE ###

import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n = int(ipt())
    a = [int(i) for i in ipt().split()]
    b = [int(i) for i in ipt().split()]
    hq = []
    ma = max(a)
    ans = 0
    for i,bi in enumerate(b):
        heapq.heappush(hq,(-bi,i))
    while len(hq) > 0:
        nbi,i = heapq.heappop(hq)
        if len(hq) > 0:
            nnbi,ni = heapq.heappop(hq)
            heapq.heappush(hq,(nnbi,ni))
        else:
            nnbi = -ma
        if i < n-1:
            bp = b[i+1]
        else:
            bp = b[0]
        bm = b[i-1]
        if -nbi-bm-bp < a[i]:
            print(-1)
            exit()
        else:
            t = math.ceil((nnbi-nbi)/(bm+bp))
            b[i] -= (bm+bp)*t
            if b[i] > a[i]:
                heapq.heappush(hq,(-b[i],i))
            ans += t
    print(ans)
    return

if __name__ == '__main__':
    main()


### FIXED CODE ###

import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n = int(ipt())
    a = [int(i) for i in ipt().split()]
    b = [int(i) for i in ipt().split()]
    hq = []
    ans = 0
    for i,bi in enumerate(b):
        if bi > a[i]:
            heapq.heappush(hq,(-bi,i))
    while len(hq) > 0:
        #print(hq,b)
        nbi,i = heapq.heappop(hq)
        if i == n-1:
            bp = b[0]
        else:
            bp = b[i+1]
        bm = b[i-1]
        t = (-a[i]-nbi)//(bm+bp)
        if t == 0:
            print(-1)
            exit()
        b[i] -= (bm+bp)*t
        if b[i] > a[i]:
            heapq.heappush(hq,(-b[i],i))
        ans += t
    print(ans)
    return

if __name__ == '__main__':
    main()
### BUGGY CODE ###

from collections import deque
from itertools import product


def read():
    H, W = list(map(int, input().split()))
    S = list()
    S.append(['#'] * (W+2))
    for h in range(H):
        s = list('#' + input() + '#')
        S.append(s)
    S.append(['#'] * (W+2))
    return H, W, S


def bfs(y, x, H, W, S):
    dirs = [(0, 1), (1, 0), (0, -1), (-1, 0)]
    visited = [[False for j in range(W+2)] for i in range(H+2)]
    q = deque()
    q.appendleft((y, x, 0))
    max_depth = 0
    while len(q) > 0:
        y, x, depth = q.pop()
        visited[y][x] = True
        max_depth = max(max_depth, depth)
        for dy, dx in dirs:
            ny, nx = y+dy, x+dx
            if S[ny][nx] == '.' and not visited[ny][nx]:
                q.appendleft((ny, nx, depth+1))
    return max_depth


def solve(H, W, S):
    dist_max = 0
    for i, j in product(range(1, H+1), range(1, W+1)):
        if S[i][j] == '.':
            d = bfs(i, j, H, W, S)
            dist_max = max(d, dist_max)
    return dist_max


if __name__ == '__main__':
    inputs = read()
    print("{}".format(solve(*inputs)))


### FIXED CODE ###

from collections import deque


def bfs(y, x, H, W, S):
    dirs = [(-1, 0), (0, -1), (1, 0), (0, 1)]
    depth = [[-1] * (W+2) for h in range(H+2)]
    q = deque()
    q.append((y, x))
    depth[y][x] = 0
    max_depth = 0
    while q:
        y, x = q.popleft()
        max_depth = max(max_depth, depth[y][x])
        for dy, dx in dirs:
            ny, nx = y + dy, x + dx
            if S[ny][nx] == '.' and depth[ny][nx] == -1:
                depth[ny][nx] = depth[y][x] + 1
                q.append((ny, nx))
    return max_depth


def solve():
    H, W = map(int, input().split())
    S = list()
    S.append(['#'] * (W+2))
    for _ in range(H):
        buf = input()
        S.append(list('#' + buf + '#'))
    S.append(['#'] * (W+2))

    dist_max = 0
    for y in range(H):
        for x in range(W):
            if S[y+1][x+1] == '.':
                d = bfs(y+1, x+1, H, W, S)
                dist_max = max(d, dist_max)
    print(dist_max)


if __name__ == '__main__':
    solve()
### BUGGY CODE ###

n = int(input())
l = list(map(int,input().split()))
r = list(map(int,input().split()))
l1 = max(l)
r1 = max(r)
left = 1
if l[0] == l1:left = 0

right = n-2
if r[-1] == l1:right = n-1

res = 1
if l1 != r1:print(0)
else:
    while l[left] != l1:
        if l[left] == l[left-1]:
            res *= l[left]
        left += 1
    while r[right] != r1:
        if r[right] == r[right+1]:
            res *= r[right]
        right -=1

    if  left > right:print(0)
    else:
        if  left < right:
            res *= l1**(right-left-1)

        print(res%1000000007)




### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
r = list(map(int,input().split()))
l1 = max(l)
r1 = max(r)
left = 1
if l[0] == l1:left = 0

right = n-2
if r[-1] == l1:right = n-1

res = 1
if l1 != r1:print(0)
else:
    while l[left] != l1:
        if l[left] == l[left-1]:
            res = (res*l[left])%1000000007
        left += 1
    while r[right] != r1:
        if r[right] == r[right+1]:
            res = (res*r[right])%1000000007
        right -=1

    if  left > right:print(0)
    else:
        if  left < right:
            for i in range(right-left-1):
                res = (res*l1)%1000000007

        print(res%1000000007)
### BUGGY CODE ###

# your code goes here
def solve(n):
	odd=0;
	even=0;
	if(n==0):
		return 1;
	if(n==1):
		return 0;
	while(n):
		if(n&1):
			odd+=1;
		if(n&2):
			even+=1;
		n=n>>2;
	return solve(abs(even-odd))
n=input()
if(solve(int(n))):
	print("Yes");
else:
	print("No");

### FIXED CODE ###

s=input()
ans=0;
for i in s:
  ans+=int(i)
if(ans%9==0):
	print("Yes");
else:
  print("No");
### BUGGY CODE ###

H, N = map(int, input().split())
ATK, MP = zip(*(tuple(map(int, input().split())) for _ in range(N)))
table = [[float("inf")] * (H + 1) for _ in range(N + 1)]
table[0][0] = 0
for magic in range(N):
    for damage in range(H + 1):
        now = table[magic][damage]
        table[magic + 1][damage] = min(now, table[magic + 1][damage])
        table[magic][min(H, damage + ATK[magic])] = min(now + MP[magic], table[magic][min(H, damage + ATK[magic])])

print(table[N - 1][H])


### FIXED CODE ###

H, N = map(int, input().split())
ATK, MP = zip(*(tuple(map(int, input().split())) for _ in range(N)))
MAX_ATK = max(ATK)
table = [0] * (H + MAX_ATK)
for damage in range(1, H + 1):
    table[damage] = min(table[damage - ATK[magic]] + MP[magic] for magic in range(N))
print(table[H])
### BUGGY CODE ###

import math

line1 = int(input())
line2 = str(input()).split(" ")
for index in range(len(line2)):
    line2[index] = int(line2[index])

keepTrack = dict()
keys = []
for element in line2:
    if element in keys:
        keepTrack[element] += 1
    else:
        keepTrack[element] = 1
        keys.append(element)
sum = 0
for key in keys:
    ##sum += abs()
    if (key < keepTrack[key]):
        sum += -key + keepTrack[key]
    elif (key > keepTrack[key]):
        sum += keepTrack[key]
print(sum)


### FIXED CODE ###

import math

line1 = int(input())
line2 = str(input()).split(" ")
for index in range(len(line2)):
    line2[index] = int(line2[index])

newList = []
counter = dict()
newLength = 0
for element in line2:
    try:
        counter[element] += 1
    except:
        counter[element] = 1
    if (counter[element] == element):
        newLength += element

print(line1 - newLength)
### BUGGY CODE ###

# E
N = int(input())
xy_list = [list(map(int, input().split())) for _ in range(N)]

M = 998244353

res = pow(2, N, M)
# 0 points
res -= 1
# 1 points
res -= N

# all lines
for i in range(N):
    xi, yi = xy_list[i]
    for j in range(i+1, N):
        xj, yj = xy_list[j]
        # count points in same line
        cnt = 0
        valid = 1
        for k in range(N):
            xk, yk = xy_list[k]
            if ((xk-xi)*(xk-xj) + (yk-yi)*(yk-yj))**2 == ((xk-xi)**2 + (yk-yi)**2)*((xk-xj)**2 + (yk-yj)**2):
                if k < j and k != i:
                    valid = 0
                else:
                    cnt += 1
        if cnt > 0 and valid == 1:
            # print(i, j, cnt)
            res -= (pow(2, cnt, M)-cnt-1)

res = res % M
print(res)

### FIXED CODE ###

# E
from collections import Counter

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

M = 998244353

res = pow(2, N, M)
# 0 points
res -= 1
# 1 points
res -= N

# all lines
line_cnt = [0]*(N+1)

for i in range(N):
    xi, yi = xy_list[i]
    angle_list = []
    for j in range(N):
        xj, yj = xy_list[j]
        if xj != xi:
            angle_list.append((yj-yi)/(xj-xi))
        elif yj != yi:
            angle_list.append(10000.0)
        
    # count points in same line
    cnt_i = Counter(angle_list)
    for k in cnt_i.values():
        line_cnt[k+1] += 1

for i in range(2, N+1):
    cnt = line_cnt[i] // i
    res -= cnt*(pow(2, i, M)-i-1)

res = res % M
print(res)
### BUGGY CODE ###

n,m = map(int,input().split())
def factor_list(n):
    res = []
    i = 2
    while i <= n:
        tmp = 0
        while n % i == 0:
            n = n // i
            tmp += 1
        if tmp > 0:
            res.append((i,tmp))
        i += 1
    return res

def combination(n,k):
    res = 1
    for i in range(n-k+1,n+1):
        res *= i 
    for i in range(1,k+1):
        res = res // i 
    return res
factors = factor_list(m)
count = 1
for num,cnt in factors:
    count *= combination(cnt+n-1,cnt)
print(count % (10**9+7))

### FIXED CODE ###

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

def comb(n, r):
    a = 1; b = 1
    for i in range(r):
        a *= (n-i)
        b *= (i+1)
    return a // b 


facts = []

i = 2
m = M
while i * i <= M:
    cnt = 0
    while m % i == 0:
        m //= i
        cnt += 1
    if cnt:
        facts.append(cnt)
    i += 1
if m > 1:
    facts.append(1)
D = 1000000007
res = 1
for f in facts:
    res = (res * comb(f + N - 1, f)) % D 
print(res)
### BUGGY CODE ###

s = input()
t = input()

dp = [[0]*(len(t)+1) for i in range(len(s)+1)]

for i in range(1,len(s)+1):
  for j in range(1,len(t)+1):
    dp[i][j] = max(dp[i-1][j-1],dp[i][j-1])
    if s[i-1] == t[j-1]:
      dp[i][j] += 1

ansl = []
cnt = dp[-1][-1]
def tami(i,j):
  global cnt
  if cnt == 0:
    return
  if s[i-1] == t[j-1]:
    cnt -= 1
    ansl.append(i-1)
  if dp[i-1][j-1]==cnt:
    tami(i-1,j-1)
  if dp[i][j-1]==cnt:
    tami(i,j-1)

tami(len(s),len(t))

ans = ""
for i in ansl:
  ans += s[i]
print(ans[::-1])

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

s = input()
t = input()

dp = [[0]*(len(t)+1) for i in range(len(s)+1)]

for i in range(1,len(s)+1):
  for j in range(1,len(t)+1):
    if s[i-1] == t[j-1]:
      dp[i][j] = max(dp[i-1][j-1]+1,dp[i-1][j],dp[i][j-1])
    else:
      dp[i][j] = max(dp[i-1][j],dp[i][j-1])

ansl = []
cnt = dp[-1][-1]
def tami(i,j):
  global cnt
  if cnt == 0:
    return
  if s[i-1] == t[j-1]:
    cnt -= 1
    ansl.append(i-1)
  if dp[i-1][j-1]==cnt:
    tami(i-1,j-1)
  elif dp[i][j-1]==cnt:
    tami(i,j-1)
  elif dp[i-1][j]==cnt:
    tami(i-1,j)

tami(len(s),len(t))

ans = ""
for i in ansl:
  ans += s[i]
print(ans[::-1])
### BUGGY CODE ###

import sys
input = sys.stdin.readline
m = 998244353
def main():
    n,k = map(int,input().split())
    l,r = [],[]
    for _ in range(k):
        l_, r_ = map(int,input().split())
        l.append(l_)
        r.append(r_)

    dp = [0]*(n+1)
    dp[1] = 1
    dpsum = [0]*(n+1)
    dpsum[1] = 1

    for i in range(2,n+1):
        for j in range(k):
            li = i - r[j]
            ri = i - l[j]
            if ri < 0:
                continue
            li = max(li,1)
            dp[i] += dpsum[ri] - dpsum[li-1]
        dpsum[i] = dpsum[i-1]+dp[i]

    print(dp[n]%m)
main()

### FIXED CODE ###

m = 998244353
def main():
    n,k = map(int,input().split())
    l,r = [],[]
    for _ in range(k):
        l_, r_ = map(int,input().split())
        l.append(l_)
        r.append(r_)

    dp = [0]*(n+1)
    dp[1] = 1
    dpsum = [0]*(n+1)
    dpsum[1] = 1

    for i in range(2,n+1):
        for j in range(k):
            li = i - r[j]
            ri = i - l[j]
            if ri < 0:
                continue
            li = max(li,1)
            dp[i] += dpsum[ri] - dpsum[li-1]
        dpsum[i] = (dpsum[i-1]+dp[i])%m

    print(dp[n]%m)
main()
### BUGGY CODE ###

K = int(input())
sevens = []

if K % 2 == 0 or K % 5 == 0:
    print(-1)
else:
    for n in range(1,10**6):
        sevens.append("7")
        int_sevens = int("".join(sevens))
        if int_sevens % K == 0:
            print(n)
            break
        if n == 10**6:
            print(-1)


### FIXED CODE ###

K = int(input())
remainder = 0
ans = -1
 
if K % 2 == 0 or K % 5 == 0:
    ans = -1
else:
    for n in range(1,10**6):
      remainder = (remainder*10 + 7) % K
      if remainder == 0:
          ans = n
          break
      if n == 10**6-1:
          ans = -1
print(ans)
### BUGGY CODE ###

a, op, b = input().split()
a = int(a)
b = int(b)
while True:
  if(op is '?') :
    break
  elif(op is "+") :
    x = a + b
  elif(op is "-") :
    x = a - b
  elif(op is "*") :
    x = a * b
  else :
    x = a // b


### FIXED CODE ###

while True :
    a, op, b = map(str, input().split())
    a = int(a)
    b = int(b)
    
    if op == "?" :
        break
    else :
        if op == "+" :
            print(a + b)
        elif op == "-" :
            print(a - b)
        elif op == "*" :
            print(a * b)
        else :
            print(a // b)
### BUGGY CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[5]:


import itertools


# In[35]:


S = input()


# In[36]:


mylist = list(map(lambda x: "".join(x), list(set(itertools.permutations(S)))))
ngs = []
for w in ["a","b","c"]:
    ngs.append(w+w)
    for x in ["a","b","c"]:
        ngs.append(w+x+w)
for word in mylist:
    for ng in ngs:
        if ng in word:
            break
    else:
        print("YES")
        break
else:
    print("NO")


# In[37]:


mylist


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[5]:


# import itertools


# In[35]:


S = input()


# In[36]:


# mylist = list(map(lambda x: "".join(x), list(set(itertools.permutations(S)))))
# ngs = []
# for w in ["a","b","c"]:
#     ngs.append(w+w)
#     for x in ["a","b","c"]:
#         ngs.append(w+x+w)
# for word in mylist:
#     for ng in ngs:
#         if ng in word:
#             break
#     else:
#         print("YES")
#         break
# else:
#     print("NO")


# In[39]:


a_cnt = S.count("a")
b_cnt = S.count("b")
c_cnt = S.count("c")
if abs(a_cnt-b_cnt) <= 1 and abs(a_cnt-c_cnt) <= 1 and abs(b_cnt-c_cnt) <= 1:
    print("YES")
else:
    print("NO")


# In[ ]:
### BUGGY CODE ###

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

while True:
    c = [i for i in a if i % 2 == 0]
    if(len(c) != n):
        break
    else:
        cnt += 1
        continue
print(cnt)

### FIXED CODE ###

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

while True:
    if sum([a[i]%2 for i in range(n)]) == 0:
        a = [int(n/2) for n in a]
        cnt += 1
    else:
        break
print(cnt)
### BUGGY CODE ###

N = int(input())

ans = 0
for c in range(1,N):
    N_ = N-c
    sq_N_ = int(N_**(1/2))
    for a in range(1,sq_N_+1):
        if N_ % a == 0:
            b = N_//a
            ans += 2
        if a == b:
            ans -= 1
print(ans)

### FIXED CODE ###

N = int(input())
 
ans = 0
for a in range(1,N):
    ans += (N-1)//a
        
print(ans)
### BUGGY CODE ###

import copy
n, max_w = map(int, input().split())

dp = [0]*(max_w+1)
for _ in range(n):
    dp_copy = copy.copy(dp)
    w, v = map(int, input().split())
    for i in range(max_w+1):
        if i >= w:
            dp_copy[i] = max(dp[i-w] + v, dp[i])
    dp = copy.copy(dp_copy)
    
print(max(dp))


### FIXED CODE ###

import numpy as np
n, max_w = map(int, input().split())

dp = [0]*(max_w+1)
dp = np.array(dp)

for _ in range(n):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])

print(max(dp))