Harryxun/stf_run huggingface dataset:
import sys

N = int(input()) #偶数の球の数
M = int(input()) #奇数の球の数

def combination(n,r):
    if n == 1:
        ans = 0

    if r != 1:
        ans = n/r * combination(n-1,r-1)
    elif r == 1:
        ans = n/r

    return ans

print(combination(N,2)+combination(M,2))


### FIXED CODE ###

import sys

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

def com(n,r):
    ans1 = 1
    ans2 = 1
    tmp = r
    while r != 0:
        ans1 = ans1 * (n)
        ans2 = ans2 * r
        n -= 1
        r -= 1

    return ans1/ans2

print(int(com(N,2)+com(M,2)))
k = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

i = int(input())
print(k[i])

### FIXED CODE ###

k = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

i = int(input())
print(k[i - 1])
# coding: utf-8
# Your code here!
N=int(input())
A=list(map(int,input().split()))
Q=int(input())
Adic={}
B=0

for i in A:
    Adic[i]=0

for i in A:
    Adic[i]+=1

for i in range(Q):
    b,c=map(int,input().split())
    
    if b not in Adic:
        for k,v in Adic.items():
            B+=k*v
        print(B)
        B=0
    else:
        
        if c in Adic:
            Adic[c]+=Adic[b]
            Adic[b]=0
        elif c not in Adic:
            Adic[c]=0
            Adic[c]+=Adic[b]
            Adic[b]=0
            
        for k,v in Adic.items():
            B+=k*v
        print(B)
        B=0

### FIXED CODE ###

i=input()
if i.islower():
    print("a")
elif i.isupper():
    print("A")
n, m, x = map(int,input().split())
a = set(map(int,input().split()))

b = a.copy
for i in range(1,x,1):
  b = b - {i}

c = a.copy
for i in range(x+1,n,1):
  c = c - {i}

print(min(len(b),len(c)))




### FIXED CODE ###

n, m, x = map(int,input().split())
a = set(map(int,input().split()))

b = a
for i in range(1,x,1):
  b = b - {i}

c = a
for i in range(x+1,n,1):
  c = c - {i}

print(min(len(b),len(c)))
import math
n = int(input())
ls = list(map(int,input().split()))
bs = [ls[i]-i-1 for i in range(n)]
bs.sort()

if n %2 ==0:
    a = int(n/2)
    can = [bs[a],bs[a-1],bs[a+1]]
else:
    a = math.floor(n/2)
    can = [bs[a], bs[a+1],bs[a-1]]

#print(can)
result = 10**10
for k in can:
    ans =0
    for kn in bs:
        ans += abs(kn-k)
    
    result = min(result, ans)
print(result)    

### FIXED CODE ###

import math
n = int(input())
ls = list(map(int,input().split()))
bs = [ls[i]-i-1 for i in range(n)]
bs.sort()
#print(bs)
if n %2 ==0:
    a = round(n/2)
    #print(a)
    can = [bs[a],bs[a-1],math.floor((bs[a] +bs[a-1])/2),math.ceil((bs[a] +bs[a-1])/2)]
elif n ==1:
    can = [bs[0],bs[0]]
else:
    a = math.floor(n/2)
    #print(a)
    can = [bs[a+1],bs[a-1],bs[a]]

#print(can)
result = 10**27
for k in can:
    ans =0
    for kn in bs:
        ans += abs(kn-k)
    #print(ans)
    result = min(result, ans)
    
print(result)
r,g=map(int,input().split());print(g*2-r)

### FIXED CODE ###

a,b=map(int,open(0));print(2*b-a)
a = int(input()).aplit(" ")
cnt=0
for i, ai in enumerate(a):
  if ai==0
  return i+1
  


### FIXED CODE ###

a = input().split(" ")
temp = 0
for i, ai in enumerate(a):
    if int(ai)==0:
        temp=i
        break
 
print(temp+1)
weight = list(map(int, input().split()))
if a+b > c+d:
  print('Left')
elif a+b < c+d:
  print('Right')
else:
  print('Balanced')

### FIXED CODE ###

weight = list(map(int, input().split()))
if weight[0]+weight[1] > weight[2]+weight[3]:
  print('Left')
elif weight[0]+weight[1] < weight[2]+weight[3]:
  print('Right')
else:
  print('Balanced')
import numpy as np
S=str(input())
X=[]
c=1
for i in range(1,len(S)):
  if S[i]==S[i-1]:
    c +=1
  elif S[i]!=S[i-1]:
    X +=[c]
    c=1
  if i==len(S)-1:
    X +=[c]
if len(X)>=3:
  X=np.cumsum(X)
  t=float('inf')
  for i in range(len(X)-1):
    u=max(X[i],len(S)-X[i])
    t=min(u,t)
  answer=t
elif len(X)==1:
  answer=X[0]
elif len(X)==2:
  answer=max(X)
print(answer)

### FIXED CODE ###

import numpy as np
S=str(input())
X=[]
c=1
for i in range(1,len(S)):
  if S[i]==S[i-1]:
    c +=1
  elif S[i]!=S[i-1]:
    X +=[c]
    c=1
  if i==len(S)-1:
    X +=[c]
if len(S)==1:
  X=[1]
if len(X)>=3:
  X=np.cumsum(X)
  t=float('inf')
  for i in range(len(X)-1):
    u=max(X[i],len(S)-X[i])
    t=min(u,t)
  answer=t
elif len(X)==1:
  answer=X[0]
elif len(X)==2:
  answer=max(X)
print(answer)
N = int(input())
P = list(map(int, input().split()))

cnt = 0
for i in range(N):
    Flg = True
    for j in range(i):
        if P[j] < P[i]:
            Flg = False
            break
    if Flg:
        cnt += 1
print(cnt)

### FIXED CODE ###

N, M = map(int, input().split())
if N == M:
    print("Yes")
else:
    print("No")
from collections import deque

s = deque(input())
q = int(input())

query = []
rev=1

for i in range(q):
    query.append(input().split())

for i in range(q):
    if query[i][0]=="1":
        rev*=-1
    else:
        if rev==1:
            if query[i][1]=="1":
                s.appendleft(query[i][2])
            else:
                s.append(query[i][2])
        else:
            if query[i][1]=="2":
                s.appendleft(query[i][2])
            else:
                s.append(query[i][2])

if rev==-1:
    s = s[::-1]
print("".join(list(s)))

### FIXED CODE ###

from collections import deque

s = deque(input())
q = int(input())

query = []
rev=1

for i in range(q):
    query.append(input().split())

for i in range(q):
    if query[i][0]=="1":
        rev*=-1
    else:
        if rev==1:
            if query[i][1]=="1":
                s.appendleft(query[i][2])
            else:
                s.append(query[i][2])
        else:
            if query[i][1]=="2":
                s.appendleft(query[i][2])
            else:
                s.append(query[i][2])

result="".join(list(s))
if rev==-1:
    result = result[::-1]
print(result)
l=[int(x) for x in input().split()]
N=l[0]
R=l[1]

if N >= 10:
  ans = R
  print(ans)
else:
  ans = R + 100*(10-k)
  print(ans)


### FIXED CODE ###

l=[int(x) for x in input().split()]
N=l[0]
R=l[1]

if N >= 10:
  ans = R
  print(ans)
else:
  ans = R + 100*(10-N)
  print(ans)
from functools import lru_cache

input_lst = list(map(int, input().split()))
h, w, k = input_lst[0], input_lst[1], input_lst[2]

def row_comb(w):
    if w <= 0:
        return 0
    if w == 1:
        return 1
    if w == 2:
        return 2
    else:
        return row_comb(w-2)+row_comb(w-1)

@lru_cache(maxsize=1000)
def trio(h,w):
    if h == 0:
        return [1] + [0 for i in range(w)]
    else:
        lst = []
        for i in range(1, w+1):
            if i == 1:
                lst.append(trio(h-1,w)[0] * row_comb(w-1) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-1) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i == 2:
                lst.append(trio(h-1,w)[0] * row_comb(w-2) + trio(h-1,w)[2] * row_comb(w-3) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w-1:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-2) + trio(h-1,w)[w-3] * row_comb(w-3) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i > 2 and i < w-1:
                a = row_comb(i-2) * row_comb(w-i)
                b = row_comb(i-1) * row_comb(w-i-1)
                c = row_comb(i-1) * row_comb(w-i)
                lst.append(trio(h-1,w)[i-2] * a + trio(h-1,w)[i] * b + trio(h-1,w)[i-1] * c)
        return lst
    
print(trio(h, w)[k-1] % 1000000007)

### FIXED CODE ###

from functools import lru_cache

input_lst = list(map(int, input().split()))
h, w, k = input_lst[0], input_lst[1], input_lst[2]

def row_comb(w):
    if w < 0:
        return 0
    elif w <= 1:
        return 1
    elif w == 2:
        return 2
    else:
        return row_comb(w-2)+row_comb(w-1)

@lru_cache(maxsize=1000)
def trio(h,w):
    if h == 0:
        return [1] + [0 for i in range(10)]
    else:
        lst = []
        for i in range(1, w+1):
            if i == 1:
                lst.append(trio(h-1,w)[0] * row_comb(w-1) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-1) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i == 2:
                lst.append(trio(h-1,w)[0] * row_comb(w-2) + trio(h-1,w)[2] * row_comb(w-3) + trio(h-1,w)[1] * row_comb(w-2))
            elif i == w-1:
                lst.append(trio(h-1,w)[w-1] * row_comb(w-2) + trio(h-1,w)[w-3] * row_comb(w-3) + trio(h-1,w)[w-2] * row_comb(w-2))
            elif i > 2 and i < w-1:
                a = row_comb(i-2) * row_comb(w-i)
                b = row_comb(i-1) * row_comb(w-i-1)
                c = row_comb(i-1) * row_comb(w-i)
                lst.append(trio(h-1,w)[i-2] * a + trio(h-1,w)[i] * b + trio(h-1,w)[i-1] * c)
        lst = lst + [0 for i in range(10)]
        return lst
    
print(trio(h, w)[k-1] % 1000000007)
N,P=map(int,input().split())
if N==1:
    print(P)
else:
    a=1
    for i in range(2,10**6+1):
        s=0
        while True:
            if P%i==0:
                P//=i
                s+=1
            else:
                if s>=N:
                    a*=i**(s//N)
                break
    print(a)


### FIXED CODE ###

N,P=map(int,input().split())
if N==1:
    print(P)
else:
    a=1
    for i in range(2,10**6+1):
        s=0
        while True:
            if P%i==0:
                P//=i
                s+=1
            else:
                if s>=N:
                    a*=i**(s//N)
                break
    print(a)
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))

A = A1 + A2 + A3
N = int(input())

index = []
for i in range(N):
    inp = int(input())
    if inp in A:
        index.append(A.index(inp))

if (0 in index and 3 in index and 6 in index) or \
   (1 in index and 4 in index and 7 in index) or \
   (2 in index and 5 in index and 8 in index) or \
   (0 in index and 4 in index and 8 in index) or \
   (2 in index and 4 in index and 6 in index) or \
   (0 in index and 1 in index and 2 in index) or \
   (3 in index and 4 in index and 5 in index) or \
   (6 in index and 7 in index and 8 in index):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N = int(input())

print( (N + 1) // 2)
x = input().upper()
print x

### FIXED CODE ###

x = raw_input().upper()
print x
# A - XOR Circle

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

if a[N-1]==0:
    ans = 'Yes'
elif N%3!=0:
    ans = 'No'
elif a[0]==a[N//3-1] and a[N//3]==a[2*N//3-1] and a[2*N//3]==a[N-1] and x^y^z==0:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

### FIXED CODE ###

# A - XOR Circle

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

if a[N-1]==0:
    ans = 'Yes'
elif N%3!=0:
    ans = 'No'
elif a[0]==a[N//3-1] and a[N//3]==a[2*N//3-1] and a[2*N//3]==a[N-1] and a[0]^a[N//3]^a[2*N//3]==0:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)
n, k = map(int, input().split())
a = list(map(int, input().split()))
f = [0 for _ in range(n)]
f[0] = 1

v = [0]
s = 0
idx = 0
loop = 0
last = 0

for i in range(k):
    vi = a[last] - 1
    if not f[vi]:
        f[vi] = 1
        last = vi
        s += 1
        v.append(vi)
    else:
        s += 1
        idx = v.index(vi)
        loop = s - idx
        break

remain = k - s
print(v[idx:][remain % loop] + 1)

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
f = [0 for _ in range(n)]
f[0] = 1

v = [1]
s = 0
idx = 0
loop = 0
last = 1
for i in range(k):
    vi = a[last - 1]
    if not f[vi - 1]:
        f[vi - 1] = 1
        last = vi
        s += 1
        v.append(vi)
    else:
        s += 1
        idx = v.index(vi)
        loop = s - idx
        break
else:
    print(vi)
    exit()
remain = k - s
print(v[idx:][remain % loop])
n = int(input())
num = [int(input()) for _ in range(2)]
print('Hello World' if n == 1 else sum(num))

### FIXED CODE ###

import sys
n = int(input())
if n == 1:
	print('Hello World')
	sys.exit()
print(sum([int(input()) for _ in range(2)]))
num = int(input())
A = list(map(int, input().split()))
H = sum(A) / 2
S = 0
for i in range(num):
  S = A[i]
  if (H - (S + A[i+1])) >= (H - S):
    print(abs(2 * S - 2 * H)

    


### FIXED CODE ###

num = int(input())
A = list(map(int, input().split()))
F = sum(A)
H = F / 2
S = 0
for i in range(num):
  S += A[i]
  if abs(H - (S + A[i+1])) > abs(H - S):
    print(abs(2 * S - F))
    break
c1 = list(input())
c2 = list(input())
ans = "YES" if c2 = c2[::-1] else "NO"
print(ans)

### FIXED CODE ###

c1 = list(input())
c2 = list(input())
ans = "YES" if c2 == c1[::-1] else "NO"
print(ans)
K = int(input())
S = input()

MAX = 10 ** 6 + 100
MOD = 10 ** 9 + 7

# Factorial
fac = [0] * (MAX + 1)
fac[0] = 1
fac[1] = 1
for i in range(2, MAX + 1):
    fac[i] = fac[i - 1] * i % MOD
    
# Inverse factorial
finv = [0] * (MAX + 1)
finv[MAX] = pow(fac[MAX], MOD - 2, MOD)
for i in reversed(range(1, MAX + 1)):
    finv[i - 1] = finv[i] * i % MOD

def comb(n, k):
    if n < k or k < 0:
        return 0
    return (fac[n] * finv[k] * finv[n - k]) % MOD

N = len(S)
ans = 0
for i in range(K + 1):
    tmp = (pow(25, K - i, MOD) * pow(26, i, MOD)) % MOD
    ans += comb(N + K - i - 1, N - 1) * tmp
    ans %= MOD
print(ans)


### FIXED CODE ###

K = int(input())
S = input()

MAX = 2 * 10 ** 6 + 1
MOD = 10 ** 9 + 7

# Factorial
fac = [0] * (MAX + 1)
fac[0] = 1
fac[1] = 1
for i in range(2, MAX + 1):
    fac[i] = fac[i - 1] * i % MOD
    
# Inverse factorial
finv = [0] * (MAX + 1)
finv[MAX] = pow(fac[MAX], MOD - 2, MOD)
for i in reversed(range(1, MAX + 1)):
    finv[i - 1] = finv[i] * i % MOD

def comb(n, k):
    if n < k or k < 0:
        return 0
    return (fac[n] * finv[k] * finv[n - k]) % MOD

N = len(S)
ans = 0
for i in range(K + 1):
    tmp = (pow(25, K - i, MOD) * pow(26, i, MOD)) % MOD
    ans += comb(N + K - i - 1, N - 1) * tmp
    ans %= MOD
print(ans)
N,M = map(int,input().split())
if M >= N:
  print("Yes")
else
  print("No")

### FIXED CODE ###

N,M = map(int,input().split())
if M >= N:
  print("Yes")
else:
  print("No")
import math
from functools import reduce
N, o = list(map(int, input().split()))
X = list(map(int, input().split()))
X = sorted(X)
X = [abs(x-o) for x in X]
# 最大公約数が答え
print(reduce(math.gcd, X))

### FIXED CODE ###

import fractions
from functools import reduce
N, o = list(map(int, input().split()))
X = list(map(int, input().split()))
X = sorted(X)
X = [abs(x-o) for x in X]
# 最大公約数が答え
print(reduce(fractions.gcd, X))
s = input()
    t = input()

    ds = dict()
    dt = dict()
    tr = dict()
    tr2 = dict()
    res = True
    for i in range(len(s)):
        ds[s[i]] = True
        dt[s[i]] = True
        if s[i] not in tr:
            tr[s[i]] = t[i]
        else:
            if tr[s[i]] != t[i]:
                res = False

        if t[i] not in tr2:
            tr2[t[i]] = s[i]
        else:
            if tr2[t[i]] != s[i]:
                res = False

    #if (len(ds) == 26 or len(dt) == 26) and ds != dt:
    #    res = False

    print("Yes" if res else "No")


### FIXED CODE ###

s = input()
t = input()

ds = dict()
dt = dict()
tr = dict()
tr2 = dict()
res = True
for i in range(len(s)):
    ds[s[i]] = True
    dt[s[i]] = True
    if s[i] not in tr:
        tr[s[i]] = t[i]
    else:
        if tr[s[i]] != t[i]:
            res = False

    if t[i] not in tr2:
        tr2[t[i]] = s[i]
    else:
        if tr2[t[i]] != s[i]:
            res = False

if (len(ds) == 26 or len(dt) == 26) and ds != dt:
    res = False

print("Yes" if res else "No")
form math import factorial as jj
mod=10**9+7
n,k=map(int,input().split())
l=sorted(map(int,input().split()))
ans=0

ml=jj(n-1)//(jj(k-1)*jj(n-k))
ans-=ml*(l[0]-l[n-1])%mod
for i in range(1,n-k+1):
  ml=ml*(n-i-k+1)//(n-i)
  ans-=ml*(l[i]-l[n-1-i])%mod
print(ans%mod)

### FIXED CODE ###

n,k=map(int,input().split())
l=sorted(list(map(int,input().split())))
mod=10**9+7
fact=[1]*(n+1)
inv=[1]*(n+1)
for i in range(2,n+1):
    fact[i]=i*fact[i-1]%mod
inv[-1]=pow(fact[-1],mod-2,mod)
for i in range(n,1,-1):
    inv[i-1]=inv[i]*i%mod
ans=0
for i in range(n):
    if i>=k-1:
        ans+=l[i]*fact[i]*inv[k-1]*inv[i-k+1]%mod
    if n-i-1>=k-1:
        ans-=l[i]*fact[n-i-1]*inv[k-1]*inv[n-i-1-k+1]%mod
    ans%=mod
print(ans)
#https://atcoder.jp/contests/abc150/tasks/abc150_b
N= int(input())

A= []
s= input()
A= list(s)

#print(A)

add = 0
for i in range(0, N-1):
    if A[i]== 'A' and A[i+1]=='B' and A[i+2]=='C':
        add = add + 1

print(add)

### FIXED CODE ###

#https://atcoder.jp/contests/abc150/tasks/abc150_b
N= int(input())
s= input()

A= []
A= list(s)

#print(A)

add = 0
for i in range(0, N-2):
    if A[i]== 'A' and A[i+1]=='B' and A[i+2]=='C':
        add = add + 1

print(add)
IN = iter(Input.split('\n')).__next__
def input():
    return IN()

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

result_list = []
for a in l:
    result_list.extend([a-1,a,a+1])
    
result_list

import collections

count = collections.Counter(result_list) # dictionary としてCounter({5: 1, 1: 3, 3: 2, 2: 2, 4: 2})
hindo_jun = count.most_common() 

print(hindo_jun[0][1])

### FIXED CODE ###

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

result_list = []
for a in l:
    result_list.extend([a-1,a,a+1])
    
result_list

import collections

count = collections.Counter(result_list) # dictionary としてCounter({5: 1, 1: 3, 3: 2, 2: 2, 4: 2})
hindo_jun = count.most_common() 

print(hindo_jun[0][1])
x, k, d = map(int, input().split())
if k%2 == 0 and abs(x)==abs(d):
  print(abs(x))
  exit()

for i in range(k):
  if abs(x - d) <= abs(x + d):
      x = x - d
  else:
      x = x + d
print(abs(x))



### FIXED CODE ###

s = input()
iter = 0
if s[0] =="R"and s[1]=="R" and s[2]=="R":
  print(3)
elif s[0] =="R"and s[1]=="R":
  print(2)
elif s[1]=="R" and s[2]=="R":
  print(2)
elif s[0] =="R"or s[1]=="R" or s[2]=="R":
  print(1)
elif s[0] =="R"and s[2]=="R":
  print(1)
else:
  print(0)
import itertools
n, k = map(int, input().split())

def c(n):
    if n <= 2:
        return 1
    return n * (n - 1) // 2


if k <= (n - 1) * (n - 2) // 2:
#         return -1
# if n > 2 and k <= c(n - 1):
    print(n - 1 + c(n - 1) - k)
    nodes = list(range(2, n + 1))
    for i in nodes:
        print(1, i)

    combi = itertools.combinations(nodes, 2)
    for i in range(c(n - 1) - k):
        print(*next(combi))
else:
    print(-1)


### FIXED CODE ###

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

def c(n):
    if n <= 2:
        return 1
    return n * (n - 1) // 2


if n > 2 and k <= c(n - 1):
    print(n - 1 + c(n - 1) - k)
    nodes = list(range(2, n + 1))
    for i in nodes:
        print(1, i)

    combi = itertools.combinations(nodes, 2)
    for i in range(c(n - 1) - k):
        print(*next(combi))
else:
    print("1\n1 2" if k == 0 else -1)
N = int(input())
A = [0] + list(map(int, input().split()))

for i in range(N-1, 0, -1):
    tmp = 0
    for t in range(i, N, i):
        tmp += A[t]
    if tmp == i:
        break

print(tmp)
for i in range(1, tmp+1):
    if i % tmp == 0:
        print(i)


### FIXED CODE ###

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

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

print(len(ans))
print(*ans)
A, B = map(int, input.split())

if A % 2 == B % 2:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")

### FIXED CODE ###

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

if A % 2 == B % 2:
  print((A+B)//2)
else:
  print("IMPOSSIBLE")
import math

  
x1 = 0
y1 = 0
x2 = 100
y2 = 0
  
def koch curve(i, n, x1, y1, x2, y2):
    x = [0] * 5
    y = [0] * 5
    if i < n:
        x[0] = x1
        y[0] = y1
        x[1] = (2 * x1 + x2) / 3.0
        y[1] = (2 * y1 + y2) / 3.0
        x[2] = (x1 + 2 * x2) / 3.0
        y[2] = (y1 + 2 * y2) / 3.0
        x[3] = (x[2] - x[1]) * math.cos(math.pi/3) - (x[2] - x[1]) * math.sin(math.pi/3) + y[1]
        y[3] = (y[2] - y[1]) * math.cos(math.pi/3) + (y[2] - y[1]) * math.sin(math.pi/3) + x[1]
        x[4] = x2
        y[4] = y2
        koch curve(i+1, n, x[0], y[0], x[1], y[1])
        print x[1], y[1]
        koch curve(i+1, n, x[1], y[1], x[3], y[3])
        print x[3], y[3]
        koch curve(i+1, n, x[3], y[3], x[2], y[2])
        print x[2], y[2]
        koch curve(i+1, n, x[2], y[2], x[4], y[4])
n = input()  
print x1 y1
koch curve(0, n, x1, y1, x2,y2)
print x2, y2

### FIXED CODE ###


 
import math

 
def koch_curve(i, n, x1, y1, x2, y2):
    x = [0]*5
    y = [0]*5
    if i < n:
        x[0] = x1
        y[0] = y1
        x[1] = (2*x1+x2)/3.0
        y[1] = (2*y1+y2)/3.0
        x[2] = (x1+2*x2)/3.0
        y[2] = (y1+2*y2)/3.0
        x[3] = (x[2] - x[1])*math.cos(math.pi/3) - (y[2] - y[1])*math.sin(math.pi/3) + x[1]
        y[3] = (y[2] - y[1])*math.cos(math.pi/3) + (x[2] - x[1])*math.sin(math.pi/3) + y[1]
        x[4] = x2
        y[4] = y2
        koch_curve(i+1, n, x[0], y[0], x[1], y[1])
        print x[1], y[1]
        koch_curve(i+1, n, x[1], y[1], x[3], y[3])
        print x[3], y[3]
        koch_curve(i+1, n, x[3], y[3], x[2], y[2])
        print x[2], y[2]
        koch_curve(i+1, n, x[2], y[2], x[4], y[4])
        
n = int(input())
 
x1 = 0
y1 = 0
x2 = 100
y2 = 0 
print x1, y1
koch_curve(0, n, x1, y1, x2, y2)
print x2, y2
a, b = map(int, input().split())

print(int((a+b)/2) + 1)

### FIXED CODE ###

a, b = list(map(int, input().split()))
import math
ans = math.ceil((a+b)/2)
print(ans)
"""
if a != b:
  print(int((a+b)/2) + 1)
else:
  print(a)
"""
n,m = map(int,input().split())
a = [int(input()) for _ in range(m)]

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

if a[0] != 1:
    dp[1] = 1
    
for i in range(2,n+1):
    if i not in a:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= 1000000007
        
print(dp[n])

### FIXED CODE ###

N, M = map(int, input().split())
a = set([int(input()) for _ in range(M)])
INF = 1000000007

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in a:
	dp[1] = 1
else:
	dp[1] = 0
for i in range(2, N + 1):
	if i in a:
		continue
	dp[i] = dp[i - 1] + dp[i - 2]
	dp[i] %= INF

print(dp[N])
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n, k = map(int, input().split())
r_max = n - k
b_max = k
for x in range(k):
    i = x + 1
    b = b_max - i
    r = r_max - i + 1
    r_count = combinations_count(i + r, i)
    b_count = combinations_count(b + i - 1, i - 1)
    # print("i({}), r({}), b({}), rc({}), bc({})".format(i, r, b, r_count, b_count))
    print(r_count * b_count % 1000000007)


### FIXED CODE ###

from operator import mul
from functools import reduce
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n, k = map(int, input().split())
r_max = n - k
b_max = k
for x in range(k):
    i = x + 1
    b = b_max - i
    r = r_max - i + 1
    if b < 0 or r < 0:
        print(0)
        continue
    r_count = cmb(i + r, i)
    b_count = cmb(b + i - 1, i - 1)
    # print("i({}), r({}), b({}), rc({}), bc({})".format(i, r, b, r_count, b_count))
    print(r_count * b_count % 1000000007)
A,B=int(i) for i in input().split()
if B%A==0:
  print(A+B)
else:
  print(B-A)

### FIXED CODE ###

A,B=(int(i) for i in input().split())
if B%A==0:
  print(A+B)
else:
  print(B-A)