Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
w=[0]
if n<100:
    print(w[100])
l=[int(i) for i in input().split()]
d=[0]
for i in l:
    d.append(i+d[-1])
d.append(0)
ans=0
for i in range(n):
    for j in range(i+1,n+1):
        p=d[j]-d[i]
        if p%m==0: ans+=1
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
l=[int(i) for i in input().split()]
w=[0]
for i in l:
    w.append((i+w[-1])%m)
ans=0
d={}
for i in w:
    if i in d:
        d[i]+=1
    else:
        d[i]=1
for i in d:
    ans+=d[i]*(d[i]-1)
print(ans//2)
print('YNeos'[''.join(input().sort())!='abc'::2])

### FIXED CODE ###

print('YNeos'[''.join(sorted(input()))!='abc'::2])
from functools import lru_cache
dan,ana=map(int,input().split())
l=[int(input()) for _ in range(ana)]
@lru_cache(maxsize=10000000)
def f(x,li):
  if x in li:return 0
  elif x==1:return 1
  elif x==2:return f(1,li)+1
  else:return (f(x-1,li)+f(x-2,li))%(10**9+7)

print(f(dan,l))

### FIXED CODE ###

n,m=map(int,input().split())
l={int(input()) for i in range(m)}
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(1,1+n):
    if i not in l:dp[i]+=dp[i-1]+dp[i-2];dp[i]%=10**9+7
print(dp[n])
import math
a,b,c,d = map(int,input().split())
lcm = int(c*d/math.gcd(c,d))

print((b-a+1) - ((b//c-(a-1)//c) + (b//d-(a-1)//d) - (b//lcm-(a-1)//lcm)))

### FIXED CODE ###

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

a,b,c,d = map(int,input().split())
lcm = int(c*d/gcd(c,d))

total = b-a+1
totalc = b//c-(a-1)//c
totald = b//d-(a-1)//d
totalcd = b//lcm-(a-1)//lcm
print(total - (totalc + totald - totalcd))
lst = list(map(int, input().split('/'))
if lst[1] >= 5:
    print('TBD')
else:
    print('Heisei')

### FIXED CODE ###

lst = list(map(int, input().split('/')))
if lst[1] >= 5:
    print('TBD')
else:
    print('Heisei')
orders = input()
price = 700
if order in orders:
  if order == "x":
    price += 100
print(price)

### FIXED CODE ###

orders = input()
price = 700
for order in orders:
  if order == "o":
    price += 100
print(price)
n = int(input())
h = list(map(int, input().split())) # list()でリスト化、それを変数に代入。
#一行で入力された数値をリストに

if(h[-1]==2 or h[-1]==4 or h[-1]==5 or h[-1]==7 or h[-1]==9):
    print("hon")
elif(h[-1]==0 or h[-1]==1 or h[-1]==6 or h[-1]==8):
    print("pon")
else:
    print("bon")


### FIXED CODE ###


str = input()
h = list(str)#文字列をリストに

if(h[-1]=='2' or h[-1]=='4' or h[-1]=='5' or h[-1]=='7' or h[-1]=='9'):
    print('hon')
elif(h[-1]=='0' or h[-1]=='1' or h[-1]=='6' or h[-1]=='8'):
    print('pon')
else:
    print('bon')
N = int(input())
A = int(input())
B = int(input())

if N == 1:
    print('Hello World')
elif N == 2:
    print(A+B)

### FIXED CODE ###

Old = int(input())
if Old == 1:
    print('Hello World')
else:
    A = int(input())
    B = int(input())
    print(A + B)
N = int(input())
A = list(map(int,input().split()))

def divisors(n):
	div = [1, n]
	
	for i in range(2, int(n**0.5)+1):
		if n % i == 0:
			div.append(i)
			if i != n//i:
				div.append(n//i)
	
	return div

flag = False
inter = set(divisors(A[0]))
union = set(divisors(A[0]))
s = len(set(divisors(A[0])))
for i in range(1,N):
    div = set(divisors(A[i]))
    s += len(div)
    inter &=  div
    union |= div
    print(s,inter,union)
if len(union) == s - N + 1:
    print('pairwise coprime')
elif inter == {1}:
    print('setwise coprime')
else:
    print('not coprime')

### FIXED CODE ###

import numpy as np
N = int(input())
A = list(map(int,input().split()))
cnt = [0] * (10**6 + 1)
for i in range(N):
    cnt[A[i]] += 1

maxcount = 0
for i in range(2,10**6+1):
    maxcount = max(maxcount,sum(cnt[i::i]))

if np.gcd.reduce(A) != 1:
    print('not coprime')
elif maxcount <= 1:
    print('pairwise coprime')
else:
    print('setwise coprime')
n, l = map(int, input().split())
s = sorted([map(int, input().split()) for _ in range(n)])
print(*s, sep='')

### FIXED CODE ###

n, l = input().split()
n = int(n)
s = [input() for _ in range(n)]
s.sort()
print(*s, sep='')
import string
from collections import defaultdict

n = int(input())
s_list = [input() for i in range(n)]

alphabet = string.ascii_lowercase
count_dict = defaultdict(int)

for c in alphabet:
  min_count = float("inf")
  for s in s_list:
    count = s.count(c)
    min_count = min(min_count, count)
    count_dict[c] = min_count

final_string = ''

for k, v in count_dict.items():
  if v == 0:
    continue
  else:
    final_string += k * v

final_string = ''.join(list(final_string).sort())

print(final_string)



### FIXED CODE ###

import string
from collections import defaultdict

n = int(input())
s_list = [input() for i in range(n)]

alphabet = string.ascii_lowercase
count_dict = defaultdict(int)

for c in alphabet:
  min_count = float("inf")
  for s in s_list:
    count = s.count(c)
    min_count = min(min_count, count)
    count_dict[c] = min_count

final_string = ''

for k, v in count_dict.items():
  if v == 0:
    continue
  else:
    final_string += k * v

final_string_list = list(final_string)
final_string_list.sort()
    
final_string = ''.join(final_string_list)

print(final_string)
n = int(input())
print(n*(n+1)//2)

### FIXED CODE ###

a = sorted(list(map(int, input().split())))
print("YES" if a[1] == 5 and a[0]== 5 and a[2] else "NO")
p=list(int(input()))
a=(p[0])
b=(p[1])
c=(p[2])
if a==7 or b==7 or c==7:
	print(Yes)
else:
	print(No)

### FIXED CODE ###

p=list(input())
a=int(p[0])
b=int(p[1])
c=int(p[2])
if a==7 or b==7 or c==7:
	print('Yes')
else:
	print('No')
from math import factorial


def main():
    MOD = 1000000007
    inp = input().split()
    n = int(inp[0])
    k = int(inp[1])
    r = n - k
    for i in range(1, k + 1):
        if r + 1 < i:
            return
        else:
            rr = cmb(r + 1, i)

        if i == 1:
            bb = 1
        elif i == k:
            bb = 1
        else:
            bb = cmb(k - 1, i - 1)
        print((rr % MOD) * (bb % MOD) % MOD)


def cmb(n, r):
    return factorial(n) / (factorial(r) * factorial(n - r))


if __name__ == '__main__':
    main()


### FIXED CODE ###

from math import factorial


def main():
    MOD = 1000000007
    inp = input().split()
    n = int(inp[0])
    k = int(inp[1])
    r = n - k
    for i in range(1, k + 1):
        if r + 1 < i:
            print(0)
            continue
        elif r + 1 == i:
            rr = 1
        else:
            rr = cmb(r + 1, i)

        if i == 1:
            bb = 1
        elif i == k:
            bb = 1
        else:
            bb = cmb(k - 1, i - 1)
        print(((rr % MOD) * (bb % MOD)) % MOD)


def cmb(n, r):
    return factorial(n) // (factorial(r) * factorial(n - r))


if __name__ == '__main__':
    main()
n = int(input())
r = int(input())
if n<10 and -1<n:
  	print(r+100(10-n))
elif n>=10:
    print(r)

### FIXED CODE ###

N,R = map(int,input().split())
plus=0
if N<10:
	plus=100*(10-N)
print(R+plus)
#3
#0 1 1 2

N = int(input())+1
leaves = list(map(int, input().split()))

nod = 0
total = 0

maxx = [0]*(N+1)
#toward
maxx[0] = 1
for i in range(1, N+1):
    notleave = maxx[i-1] - leaves[i-1]
    maxx[i] = notleave*2

#backward
for i in range(1, N+1):
    ii = N-i
    #at least need newnod nodes
    newnod = int((nod+1)/2) + leaves[ii]
    if newnod > 2**ii:
        total = -1
        break
    #maximum is?
    newnod = nod + leaves[ii]
    if newnod > maxx[ii]: newnod = maxx[ii]
    total += newnod
    nod = newnod

print(total)


### FIXED CODE ###

import math
#3
#0 1 1 2

N = int(input())+1
leaves = list(map(int, input().split()))

nod = 0
total = 0

maxx = [0]*(N+1)
#toward
maxx[0] = 1
if N == 1 and leaves[0] == 1:
    total = 1
else:
    for i in range(1, N):
        notleave = maxx[i-1] - leaves[i-1]
        if notleave <= 0:
            total = -1
            break
        maxx[i] = notleave*2
        if maxx[i] < leaves[i]:
            total = -1
            break
        # if i == N-1:
        #     total += leaves[i]
        # else:
        #     total += maxx[i]



    #backward
    for i in range(1, N+1):
        ii = N-i
        #at least need newnod nodes
        newnod = int((nod+1)/2) + leaves[ii]
        if newnod > maxx[ii]:
            total = -1
            break
        #maximum is?
        newnod = nod + leaves[ii]
        if newnod > maxx[ii]: newnod = maxx[ii]
        if newnod <= 0:
            total = -1
            break
        total += newnod
        nod = newnod


if total <= 0: total = -1
print(total)
s = input()
t = input()

a = []

for i in range(len(s)-len(t)):
    count = 0
    for j in range(len(t)):
        if t[j] == s[i + j]:
            count += 1
    a.append(count)
print(len(t)-max(a))

### FIXED CODE ###

s = input()
t = input()

a = []

for i in range(len(s)-len(t)+1):
    count = 0
    for j in range(len(t)):
        if t[j] == s[i + j]:
            count += 1
    a.append(count)
print(len(t)-max(a))
import sys
from math import gcd

lines = sys.stdin.readlines()

a, b = map(int, lines[0].split())

x = gcd(a, b)

print(x * (a//x) * (b//x))

### FIXED CODE ###

import sys
from fractions import gcd

lines = sys.stdin.readlines()

a, b = map(int, lines[0].split())

x = gcd(a, b)

print(x * (a//x) * (b//x))
while True:
    a=int(input())
    if a ==0:
        break

    i=1
    print(Case i: a)
    i+=1
    

### FIXED CODE ###

i=0
while True:
    a = int(input())
    if a == 0:
        break
    i += 1
    print("Case {}: {}".format(i,a))
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)] ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)


N, M = LI()
LR = []

for i in range(M):
    LR.append(LI())

#低い方と高い方を求める
lower = None
found = False
for i in range(1,N+1):
    if found:
        break
    for lr in LR:
        if not (lr[0] <= i <= lr[1]):
            break
    else:
        lower = i
        found = True

if lower == None:
    print(0)
    exit()
#  print('lower', lower)
if lower == N:
    print(1)
    exit()

upper = None
found = False
for i in reversed(range(lower+1, N+1)):
    if found:
        break
    for lr in LR:
        if not (lr[0] <= i <= lr[1]):
            break
    else:
        upper = i
        found = True
if upper == None:
    upper = lower
#  print('upper', upper)
print(upper - lower + 1)




### FIXED CODE ###

import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)


N, M = LI()
LR = []

for i in range(M):
    LR.append(LI())

left, right = 0, inf
for lr in LR:
    left = max(left, lr[0])
    right = min(right, lr[1])
#  print(left, right)
if left > right:
    print(0)
else:
    print(right - left + 1)
import numpy as np
n=int(input())
a=np.array(list(map(int,input().split())))
x=np.zeros((n,n))
for i in range(n):
  x[i][i]=0.5
  if i!=n-1:
    x[i][i+1]=0.5
  else:
    x[i][0]=0.5
inv_x=np.linalg.inv(x)
ans=np.dot(inv_x,a)
ans=ans.tolist()
ans=list(map(str,map(int,ans)))
print(" ".join(ans))


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=[0]*n
ans[0]=sum(a[::2])-sum(a[1::2])
for i in range(1,n):
  ans[i]=2*a[i-1]-ans[i-1]
ans=list(map(str,ans))
print(" ".join(ans))
def run(x, n, num_array):
    '''
    '''
    if len(num_array) == 0:
        print(x)
        return
    
    i = 1
    while True:
        if x - i not in num_array:
            print(x - i)
            print('x-i: x={}, i={}'.format(x, i))
            return
        if x + i not in num_array:
            print(x + i)
            return
        i += 1
        

if __name__ == '__main__':
    x, n = list(map(int, input().split()))
    num_array = list(map(int, input().split()))
    run(x, n, num_array)

### FIXED CODE ###

def run(x):
    '''
    '''
    for i,v in enumerate(x):
        if v == 0:
            print(i+1)


if __name__ == '__main__':
    x = list(map(int, input().split()))
    run(x)
a = input()
ｂ = input()
c =  int(a) * int(b)

if c%2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

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

if c%2 == 0:
    print("Even")
else:
    print("Odd")
N = int(input())
A = list(map(int, input().split()))
ans = [0]*N
for i in range(N):
  ans[A[i]-1] += 1
for j in range(N):
  print(ans[j])

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
ans = [0]*N
for i in range(N-1):
  ans[A[i]-1] += 1
for j in range(N):
  print(ans[j])
class BellmanFord():
    class Edge():
        def __init__(self, _from, _to, _cost):
            self.from_ = _from
            self.to = _to
            self.cost = _cost

    def __init__(self):
        self.edges = []  # 辺
        self.v_set = set()  # 頂点の集合

    @property
    def E(self):
        return len(self.edges)

    @property
    def V(self):
        return len(self.v_set)

    def add(self, _from, _to, _cost):
        self.edges.append(self.Edge(_from, _to, _cost))
        self.v_set.add(_from)
        self.v_set.add(_to)

    def shortest_path(self, s):
        d = [float("inf")] * self.V
        d[s] = 0

        while True:
            do_update = False
            for i in range(self.E):
                e = self.edges[i]
                if d[e.from_] != float("inf") and d[e.to] > d[e.from_] + e.cost:
                    d[e.to] = d[e.from_] + e.cost
                    do_update = True

            if not do_update: break

        return d

    def exist_negative_loop(self):
        d = [0] * self.V
        for i in range(self.V):
            for j in range(self.E):
                e = self.edges[j]
                if d[e.to] > d[e.from_] + e.cost:
                    d[e.to] = d[e.from_] + e.cost
                    if i == self.V - 1: return True
        return False

n, m, p = map(int, input().split())
abc = []
e = [[] for _ in range(n)]
for _ in range(m):
    a, b, c = map(int, input().split())
    abc.append([a-1, b-1, p-c])
    e[a-1].append(b-1)

v = [0] * n
v[0] = 1
def bfs(x, depth):
    #print(x, depth, e[x])
    if depth >= n:
        return 1
    if x == n-1:
        return 0
    temp = 1
    for y in e[x]:
        #print(y)
        if v[y] == 1 or x == y:
            continue
        #print(x, y)
        ret = bfs(y, depth + 1)
        if ret == 0:
            v[y] = 1
            temp = 0
    return temp

bfs(0, 0)
x = 1
for i in range(n):
    if v[i] == 1:
        v[i] = x
        x += 1

bf = BellmanFord()
for a, b, c in abc:
    if v[a]!= 0 and v[b] != 0:
        bf.add(v[a]-1, v[b]-1, c)

if bf.exist_negative_loop():
    print(-1)
    exit()
else:
    print(max(0, - bf.shortest_path(0)[-1]))

### FIXED CODE ###

n, m, p = map(int, input().split())
abc = []
for _ in range(m):
    a, b, c = map(int, input().split())
    abc.append([a-1, b-1, p-c])

d = [float('inf')] * n
d[0] = 0

for i in range(n):
    for a, b, c in abc:
        d[b] = min(d[b], d[a] + c)

for a, b, c in abc:
    if d[b] > d[a] + c:
        d[b] = - float('inf')

for i in range(n):
    for a, b, c in abc:
        d[b] = min(d[b], d[a] + c)

if d[n-1] == - float('inf'):
    print(-1)
else:
    print(max(0, - d[n-1]))
x = raw_input()
print (x ** 3)


### FIXED CODE ###

x = int(input())
print (x ** 3)
def main():
	a,b = map(int, input().split())
	if (b %= a) == 0:
		print(a+b)
	else:
		print(b-a)

if __name__ == '__main__':
	main()

### FIXED CODE ###

def main():
	a,b = map(int, input().split())
	if (b % a) == 0:
		print(a+b)
	else:
		print(b-a)

if __name__ == '__main__':
	main()
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)] 

p = Q - K
for i in range(N):
    j = A.count(i+1)
    if j > p:
        print('Yes')
    else:
        print('No')
    j = 0


### FIXED CODE ###

S = str(input())

A = ['Sunny','Cloudy','Rainy']
i = 0

if S == 'Sunny':
    i = 1
elif S == 'Cloudy':
    i = 2
else:
    i =0

print(A[i])
N, K = map(int,input().split())
S = [i for i in input()]
S[K] = S[K].lower()
print("".join(S))

### FIXED CODE ###

N, K = map(int,input().split())
S = [i for i in input()]
S[K-1] = S[K-1].lower()
print("".join(S))
l = input().split()
num_city    = int(l[0])
num_train   = int(l[1])
num_qa      = int(l[2])


str_train = []
end_train = []
for i in range(num_train):
    l = input().split()
    dist = 0
    str_train.append( int(l[dist]) )
    dist = 1
    end_train.append( int(l[dist]) )

str_qa = []
end_qa = []

for i in range(num_qa):
    l = input().split()
    dist = 0
    str_qa.append( int(l[dist]) )
    dist = 1
    end_qa.append( int(l[dist]) )




S_str = []
s = {}
for i in range(num_city + 1):
    S_str.append(s)

for i in range(num_qa):
    str_v = str_qa[i]
    for j in range(0,str_v + 1):
        S_str[j].add(str_v)

S_end = []
s = {}
for i in range(num_city + 1):
    S_end.append(s)

for i in range(num_qa):
    end_v = end_qa[i]
    for j in range(end_v , num_city + 1):
        S_end[j].add(end_v)

for i in range(0,num_qa):
    str_v = str_qa[i]
    s1 = S_str[ str_v ]

    end_v = end_qa[i]
    s2 = S_end[ end_v ]

    s_intersection = s1 & s2

    print(len(s_intersection))


### FIXED CODE ###

l = input().split()
A = int(l[0])
B = int(l[1])

total = A * B
michi = A + B - 1
hatake = total - michi


print(hatake)
n = int(input())
k = int(input())


for i in range(n):
    if 2 * s < s + k:
        s += s
    else:
        s += k
print(s)

### FIXED CODE ###

n = int(input())
k = int(input())
s = 1
for i in range(n):
    if 2 * s < s + k:
        s += s
    else:
        s += k
print(s)
mport math

b=int(input())

print(math.pi*b*2)


### FIXED CODE ###

import math

b=int(input())

print(math.pi*b*2)
n, m = input().split()

if n = m:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n, m = input().split()

if n == m:
  print('Yes')
else:
  print('No')
N, L, *A = map(int, open(0).read().split())

k = -1
for i in range(N - 1):
    if A[i] + A[i + 1] >= L:
        k = i + 1
        break

if k == -1:
    print("Impossible")
else:
    print("Possible", *range(1, k), *range(N - 1, k, -1), k, sep="\n")

### FIXED CODE ###

N, L, *A = map(int, open(0).read().split())

k = -1
for i in range(N - 1):
    if A[i] + A[i + 1] >= L:
        k = i + 1
        break

if k == -1:
    print("Impossible")
else:
    print("Possible")
    for j in range(1, k):
        print(j)
    for j in reversed(range(k + 1, N)):
        print(j)
    print(k)
N, K = map(int, input().split())
S = input()
lCnt = S.count('L')
rCnt = S.count('R')
tmp = ''
if lCnt < rCnt:
    tmp = 'L'
else:
    tmp = 'R'

sindex = 0
eindex = 0
secnt = 0
anslst = [list([0] * 3) for i in range(N)]

for i in range(N):
    if sindex == 0:
        if S[i] == tmp:
            sindex = i
        else:
            complex
    else:
        if S[i] != tmp:
            eindex = i - 1
            anslst[i][0] = sindex
            anslst[i][1] = eindex
            anslst[i][2] = eindex - sindex + 1
            sindex = 0
            eindex = 0
if sindex != 0:
    eindex = N - 1
    anslst[N - 1][0] = sindex
    anslst[N - 1][1] = eindex
    anslst[N - 1][2] = eindex - sindex + 1
anslst.sort(key=lambda x: x[2], reverse=True)

if tmp == 'R':
    tmp = 'L'
else:
    tmp = 'R'

for i in range(K):
    S = S[0:anslst[i][0]] + (tmp * anslst[i][2]) + S[anslst[i][1] + 1:]

ans = 0
if K == 1:
    for i in range(N - 1):
        if S[i] == tmp:
            if S[i] == S[i + 1]:
                ans += 1
else:
    for i in range(1, N - 1):
        if S[i] == tmp:
            if S[i] == S[i + 1]:
                ans += 1
    ans += anslst[0][2]

print(ans)

### FIXED CODE ###

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

if S[0] == 'R':
    tmp = 'RL'
else:
    tmp = 'LR'
cnt = 0
ans = 0
for i in range(len(S) - 1):
    if S[i] == S[i + 1]:
        ans += 1
    if S[i:i + 2] == tmp:
        cnt += 1

if cnt > M:
    ans += 2 * M
else:
    ans += 2 * cnt

if N == ans:
    ans -= 1
print(ans)
x,y,z=map(int,input().split()):
print(z+" "+x+" "+y)

### FIXED CODE ###

x,y,z=map(int,input().split())
print(str(z)+" "+str(x)+" "+str(y))
N = input().split()

a = int(N{0})
b = int(N{1})
c = int(N{2})

count = 0
for i in range(a, b):
    d = c % i
    if d == 0:
       count += 1
print(count)

### FIXED CODE ###

N = input().split()

a = int(N[0])
b = int(N[1])
c = int(N[2])

count = 0
while a <= b:
    if c % a == 0:
       count += 1
    a += 1
print(count)
N, L = map(int, input().split())
 
if L > -1:
  N_eat = 1
elif N+L-1 < 1:
  N_eat = N
else:
  N_eat = 1-L
pie = N*N/2 +N*(L-1) - (L + N_eat-1) 
print(pie)

### FIXED CODE ###

S = input()
judge = "Good"
for num in range(3):
  if int(S[num]) == int(S[num + 1]):
    judge = "Bad"
    break
print(judge)
# -*- coding: utf-8 -*-

import sys

w = sys.stdin.readline().strip()
count = 0

while True:
    t = list(map(int, input().split()))

    if 'END_OF_TEXT' in t:
        break

    for i in range(len(t)):
        if t[i].lower() == w:
            count += 1

print(count)



### FIXED CODE ###

# -*- coding: utf-8 -*-

import sys

w = sys.stdin.readline().strip()
count = 0

while True:
    t = list(map(str, input().split()))

    if 'END_OF_TEXT' in t:
        break

    for i in range(len(t)):
        if t[i].lower() == w:
            count += 1

print(count)
a,b,c,d = list(map(int, input().split()))

if abs(a - c) <= d:
    print("Yes")

elif abs(a-b) <= d and ans(b-c) <= d:
    print("Yes")

else:
    print("No")


### FIXED CODE ###

a,b,c,d = list(map(int, input().split()))

if abs(a - c) <= d:
    print("Yes")

elif abs(a-b) <= d and abs(b-c) <= d:
    print("Yes")

else:
    print("No")
n=int(input())
a=list(map(int,input().split()))
b=[0]*10009
c=[0]*10009
for i in range(n//2):
  b[a[i*2]]+=1
  c[a[i*2+1]]+=1
t=max(b)
r=max(c)
s=b.index(t)
p=c.index(r)
if s==p:
  b[s]=0
  k=max(b)
  c[p]=0
  j=max(c)
  f=max(k+r,t+j)
else:
  f=t+r
print(n-f)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[0]*100009
c=[0]*100009
for i in range(n//2):
  b[a[i*2]]+=1
  c[a[i*2+1]]+=1
t=max(b)
r=max(c)
s=b.index(t)
p=c.index(r)
if s==p:
  b[s]=0
  k=max(b)
  c[p]=0
  j=max(c)
  f=max(k+r,t+j)
else:
  f=t+r
print(n-f)