Harryxun/stf_run huggingface dataset:
n = int(input())
A = list(map(int, input().split()))
from collections import Counter
c = Counter(A)
sorted_key = sorted(c.keys(),reverse=True)
res = [0]*len(sorted_key)
ans = n
#print(sorted_key)
#for i,key in enumerate(sorted_key):
for key in sorted_key:
    if c[key]>1:
        ans -= c[key]
        continue
    for j in range(len(sorted_key)-1, i, -1):
        #print(i,key,j,sorted_key[j])
        if (key/sorted_key[j]>=1) and (key%sorted_key[j])==0:
            #res[i] = 1
            ans -= c[key]
            #print('===========',)
            break

#print('res', res)
#print(c)
'''ans = 0
for i,v in enumerate(sorted_key):
    if res[i]:
        ans += c[sorted_key[i]]
    else:
        if c[v] >1:
            ans += c[sorted_key[i]]'''
print(ans)

### FIXED CODE ###

n = int(input())
A = sorted(list(map(int, input().split())))
from collections import Counter
c = Counter(A)

dp = [1]*(max(A)+1)
#print(dp)
for i in c.keys():
    j = i*2
    while j<len(dp):
        dp[j] = 0
        j += i
        #print(j, end=',')
ans = 0
for i in c.keys():
    if c[i] == 1:
        if dp[i] == 1:
            ans += 1
print(ans)
100000 1
1 100000


### FIXED CODE ###

n, m = map(int, input().split())
l, r = 0, 100001
for i in range(m):
    x, y = map(int, input().split())
    if l <= x:
        l = x
    if r >= y:
        r = y
print(len([x for x in range(l, r+1)]))
i = [int(input().strip()) for i in range(5)]

mod = 10
for s in range(5):
	tmp = i[s] % 10
	if tmp!=0:
		if mod > tmp:
			mod=tmp
			last=s
sum=0
for s in range(5):
  if(s!=last):
    tmp=i[s] // 10
    mod=i[s] % 10
    if mod >0:
      sum+=tmp + 1
    else:
      sum+=tmp
print(sum*10 +i[last])

### FIXED CODE ###

i = [int(input().strip()) for i in range(5)]

mod = 10
last =1
for s in range(5):
	tmp = i[s] % 10
	if tmp!=0:
		if mod > tmp:
			mod=tmp
			last=s
sum=0
for s in range(5):
  if(s!=last):
    tmp=i[s] // 10
    mod=i[s] % 10
    if mod >0:
      sum+=tmp + 1
    else:
      sum+=tmp
print(sum*10 +i[last])
import math
ans = False
a, b, c, k = map(int, input().split()
ans += min(k, a)
k -= min(k, a)
k -= min(k, b)
ans -= min(k, c)
print(ans)

### FIXED CODE ###

import math
ans = False
a, b, c, k = map(int, input().split())
ans += min(k, a)
k -= min(k, a)
k -= min(k, b)
ans -= min(k, c)
print(ans)
n = int(input())
del = list(map(int, input().split()))
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += del[i] * del[k]
  i += 1
  
print(sum)



### FIXED CODE ###

n = int(input())
deliciousness = list(map(int, input().split()))
sum = 0
i = 0

while i < n - 1:
  k = i
  while k < n - 1:
    k += 1
    sum += deliciousness[i] * deliciousness[k]
  i += 1
  
print(sum)
n,k = map(int,input().split())
p = list(map(int,input().split()))

a =[]
for i in range(n-k):
  sum_k = sum(p[i:i+k])
  a.append(sum_k)
ans = (max(a)+k)/2

print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    N, K = map(int, input().split())
    P = list(map(int, input().split()))

    tmp_max = sum(P[:K])
    tmp = sum(P[:K])
    for i in range(N-K):
        tmp += P[i+K]
        tmp -= P[i]

        if tmp > tmp_max:
            tmp_max = tmp

    print((tmp_max + K) / 2)

main()
#入力
S_prime = str(input())
T = str(input())
ans = []

if len(S_prime) >= len(T):
    times = len(S_prime) - len(T) + 1
    for i in range(times):
        count = 0
        for j in range(len(T)):
            if S_prime[i+j] == '?':
                count = count + 1
            elif S_prime[i+j] != T[j]:
                continue
            else:
                count = count + 1
            
        if count == len(T):
            S_prime = S_prime[:i] + T + S_prime[(i+len(T)+1):]
            S = S_prime.replace('?', 'a')
            ans.append(S)


if len(ans) != 0:
    print(min(ans))
else:
    print('UNRESTORABLE')

### FIXED CODE ###

#入力
S_prime = str(input())
T = str(input())
ans = []

if len(S_prime) >= len(T):
    times = len(S_prime) - len(T) + 1
    for i in range(times):
        count = 0
        for j in range(len(T)):
            if S_prime[i+j] == '?':
                count = count + 1
            elif S_prime[i+j] != T[j]:
                continue
            else:
                count = count + 1
            
        if count == len(T):
            S = S_prime[:i] + T + S_prime[(i+len(T)):]
            S = S.replace('?', 'a')
            ans.append(S)


if len(ans) != 0:
    print(min(ans))
else:
    print('UNRESTORABLE')
a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])

saisyo = 1 * animal
saidai = 2 * animal
b = foot / 2

if (foot % 2 = 0) and (saisyo <= b <= saidai):
	print("Yes")
else:
    print("No")

### FIXED CODE ###

a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])
 
saisyo = 2 * animal
saidai = 4 * animal
 
if (foot % 2 == 0) and (saisyo <= foot <= saidai):
	print("Yes")
else:
    print("No")
H,W = input().split()
H,W=int(H),int(W)
sw=[[0]*W]*H

for i in range(W):
    sw[i] = input()

count=0
if sw[0][0]=='#':
    sw[0]='.'+sw[0][1:]
    count+=1
if sw[H-1][W-1]=='#':
    sw[H-1]=sw[H-1][:W-1]+'.'
    count+=1

def search(h,v):
    global H,W
    global sw
    if h>=H-1 and v>=W-1:
        return -2,-2
    elif v>=H-1:
        if sw[h+1][W-1]=='.':
            return h+1,v
        else:
            return -1,-1
    elif h>=W-1:
        if sw[H-1][v+1]=='.':
            return h,v+1
        else:
            return -1,-1
    else:
        if sw[h+1][v]=='.':
            return h+1,v
        elif sw[h][v+1]=='.':
            return h,v+1
        else:
            return -1,-1

h=0
v=0
i=0
while(1):
    flag=True
    for j in range(i+1):
        result = search(h+i-j,v+j)
        if result == (-2,-2):
            exit()
        if result!=(-1,-1):
            i=0
            flag = False
            h,v=result
            break
    if flag:
        count+=1
        i+=1

### FIXED CODE ###

import numpy as np

H,W = input().split()
H,W=int(H),int(W)
P=[0]*H
for i in range(H):
    P[i] = input()

dp=np.zeros((H,W),dtype='u8')
if P[0][0]=='#':
    dp[0][0]=1
else:
    dp[0][0]=0

def DP(y,x):
    global dp
    if 0<=x<=W-1 and 0<=y<=H-1:
        return dp[y][x]
    else:
        return 9999999

for l in range(1,H+W):
    for i in range(l+1):
        if i<H and l-i<W:
            if P[i][l-i]=='#':
                a=DP(i-1,l-i)
                b=DP(i,l-i-1)
                if a < 9999999:
                    if P[i-1][l-i]=='.':
                        a+=1
                if b <  9999999:
                    if P[i][l-i-1]=='.':
                        b+=1
                dp[i][l-i]=min(a,b)
            else:
                #print(i,l-i,DP(i-1,l-i),DP(i,l-i-1))
                dp[i][l-i]=min(DP(i-1,l-i),DP(i,l-i-1))
print(dp[H-1][W-1])
N,K=map(int,input().split())
A=list(map(int,input().split()))
B=[]
C=[]
for i in A:
  if i<=0:    
    B.append(i)
  else:
    C.append(i)

b=len(B)
c=len(C)
a=min(b,c,K)

l=10**9
for i in range(a):
  la=C[i]+B[i+1-K]*(-2)
  lb=C[i]*2-B[i+1-K]
  l=min(l,la,lb)

BB=10**9
CC=10**9
if b>=K:
  BB=(B[-K])*(-1)
if c>=K:
  CC=(C[K-1])
print(min(BB,CC,l))

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
a=N-K+1
long=10**9
for i in range(a):
  l=A[i+K-1]-A[i]+min(abs(A[i+K-1]),abs(A[i]))
  long=min(long,l)
print(long)
import sys
import numpy as np
from itertools import permutations
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

MOD = 1000000000 + 7

N, *X = map(int, read().split())
cnt = 1
for i in range(1, N):
    cnt *= i
ans = 0

"""
l = list(permutations(range(1, N)))
for per in l:
    ans += np.abs(np.diff(np.array(list(per) + [N]))).sum()
    ans %= MOD
    print(ans, per)
"""

for i in range(1, N):
    for j in range(1, i+1):
        ans += j * (cnt / i)

print(int(ans % MOD))



### FIXED CODE ###

import sys
import numpy as np
from itertools import permutations
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

MOD = int(1e+9 + 7)


class Comb(object):
    def __init__(self, n, MOD=1e9+7):
        self.n = n
        self.MOD = MOD

        fac = [0] * self.n
        finv = [0] * self.n
        inv = [0] * self.n

        fac[0] = 1
        fac[1] = 1
        finv[0] = 1
        finv[1] = 1
        inv[1] = 1

        for i in range(2, n):
            fac[i] = fac[i-1] * i % MOD
            inv[i] = MOD - inv[(MOD % i)] * (MOD // i) % MOD
            finv[i] = finv[i-1] * inv[i] % MOD
        self.fac = fac
        self.finv = finv
        self.inv = inv

    def calv(self, k):
        if self.n < k:
            return 0

        return self.fac[n] * (self.finv[k] * self.finv[n-k] % self.MOD) % self.MOD


N, *X = map(int, read().split())
X = np.array(X)
X_diff = np.diff(X)

comb = Comb(N+5, MOD)

acc = 0
ans = 0
for i in range(1, N):
    acc += comb.fac[N-1] * comb.inv[i]
    acc %= MOD

    ans += acc * (X_diff[i-1])
    ans %= MOD


print(ans % MOD)
n=int(input())
a=list(map(int,input().split()))

from collections import Counter

c=Counter(a)

v=list(c.values())
k=list(c.keys())

v=sorted(v)

ans='Yes'
if len(k)==3:
    for i in range(3):
        if v[i]!=n/3:
            ans='No'
            break
elif len(k)==2:
    for j in range(2):
        if v[j]!=n/3 and j==0:
            ans='No'
        elif v[j]!=2*n/3 andj==1:
            ans='No'
elif len(k)==1 and k[0]==0:
    ans='Yes'
else:
    ans='No'

print(ans)

### FIXED CODE ###

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

ans='No'
from collections import Counter

c=Counter(a)
keys = list(c.keys())
values =list(c.values())

if keys==[0]:
    ans='Yes'
elif len(keys)==3 and values[0]==n/3 and values[1]==n/3 and keys[0]^keys[1]==keys[2]:
    ans='Yes'
elif len(keys)==2 and c[0]==n/3:
    ans='Yes'

print(ans)
n,k=map(int,input().split())
a=list(map(int,input().split()))
check=[[] for i in range(n)]
c=0
g=1
tmp=[]
cy=[]
non=[]

while c<n:
    if check[g-1]==[]:
        c+=1
        tmp.append(g)
        check[g - 1].append(c)
        g=a[g-1]
    else:
        cy=tmp[(check[g-1][0]-1):]
        non=tmp[:(check[g-1][0]-1)]
        break
k-=len(non)
k%=len(cy)
if k<=len(non):
    print(non[k-1])
    exit()

print(cy[k])

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
check=[[] for i in range(n)]
c=0
g=1
tmp=[]
cy=[]
non=[]

while c<n:
    if check[g-1]==[]:
        c+=1
        tmp.append(g)
        check[g - 1].append(c)
        g=a[g-1]
    else:
        cy=tmp[(check[g-1][0]-1):]
        non=tmp[:(check[g-1][0]-1)]
        break
if k<len(non):
    print(non[k])
    exit()
k-=len(non)
k%=len(cy)


print(cy[k])
n,m,k = map(int,input().split())
arr0 = list(map(int,input().split()))
arr1 = list(map(int,input().split()))
acc0 = []

for i in range(n):
  acc0.append(acc0[-1] + arr0[i])
acc1 = []
for i in range(m):
  acc1.append(acc1[-1] + arr1[i])
ans = 0
j = m
for i in range(n+1):
  if acc0[i] > k:
    break
  while acc1[j] > k - acc0[i] and j > 0:
    j -= 1
  ans = max(ans, i + j)

print(ans)


### FIXED CODE ###

from sys import stdin
import bisect

def main():
    input = stdin.readline
    n, m, k = map(int, input().split())
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    c = [0] * (n + 1)
    for i in range(n):
        c[i + 1] = c[i] + a[i]
    d = [0] * (m + 1)
    for i in range(m):
        d[i + 1] = d[i] + b[i]
    cnt = 0
    for i in range(n + 1):
        if c[i] > k:
            break
        e = bisect.bisect_right(d, k - c[i])
        if cnt < i + e - 1:
            cnt = i + e - 1
    print(cnt)
main()
n, k = map(int, input().split())
array = list(map(int, input().split()))
count = [0] * n
from collections import Counter
lis = sorted((Counter(array)).items(), key = lambda x: x[1])[:n]
count2 = 0
for i in range(len(lis)):
    if len(lis) > k:
        count2 += lis[i][1]
        lis.remove(lis[i])
print(count2)

### FIXED CODE ###

import collections
n, k = map(int, input().split())
d = collections.defaultdict(int)
b = map(int, input().split())
for e in b:
    d[e] += 1
ret = 0
a = sorted([v for v in d.values()], reverse = True)
while len(a) > k:
    ret  += a.pop()
print(ret)
N = int(input())
Ls = list(map(int, input().split()))
Ls.sort()
# O(N^2 * logN)の全探索で解く
ans = 0
for a_i in range(N):
  for b_i in range(a_i+1, N):
    c_i = bisect.bisect_left(Ls, Ls[a_i]+Ls[b_i])
    if c_i > b_i:
　     ans += c_i - b_i - 1
    else:
       pass
print(ans)

### FIXED CODE ###

import bisect

def solve():
    N = int(input())
    Ls = list(map(int, input().split()))
    Ls.sort()

    # O(N^2 * logN)の全探索で解く
    ans = 0
    for a_i in range(N):
        for b_i in range(a_i+1, N):
            c_i = bisect.bisect_left(Ls, Ls[a_i]+Ls[b_i])
            if c_i > b_i:
                ans += c_i - b_i - 1
            else:
                pass

    print(ans)

if __name__ == "__main__":
    solve()
code = """

# distutils: language=c++
# distutils: include_dirs=[/home/contestant/.local/lib/python3.8/site-packages/numpy/core/include, /opt/atcoder-stl]
# cython: boundscheck=False
# cython: wraparound=False


cdef extern from "<atcoder/fenwicktree>" namespace "atcoder":
    cdef cppclass fenwick_tree[T]:
        fenwick_tree(int n)
        void add(int p, T x)
        T sum(int l, int r)

cdef class FenwickTree:
    cdef fenwick_tree[long long] *_thisptr
    def __cinit__(self, int n):
        self._thisptr = new fenwick_tree[long long](n)
    cpdef void add(self, int p, long long x):
        self._thisptr.add(p, x)
    cpdef long long sum(self, int l, int r):
        return self._thisptr.sum(l, r)
"""


import os,sys
if sys.argv[-1] == 'ONLINE_JUDGE':
    open('atcoder.pyx','w').write(code)
    os.system('cythonize -i -3 -b atcoder.pyx')


from atcoder import FenwickTree

readline = sys.stdin.buffer.readline

N, Q = list(map(int, readline().split()))
ft = FenwickTree(N)

A = list(map(int, readline().split()))

for i, a in enumerate(A):
    ft.add(i, a)

for i in range(N):
    a, b, c = list(map(int, readline().split()))
    if a == 0:
        ft.add(b, c)
    else:
        print(ft.sum(b, c))

### FIXED CODE ###

class BIT:
            
    def __init__(self, L):
        self.N = len(L)
        self.bit = [0]*self.N
        for i,l in enumerate(L):
            self.add(i,l)
        self.N0 = 1
        while self.N0*2 <= self.N:
            self.N0 *= 2

    def add(self, a, w):
        x = a + 1
        for i in range(1000):
            self.bit[x-1] += w
            x += x & -x
            if x > self.N:
                break

    def sum(self, a):
        x = a+1
        ret = 0
        for i in range(1000):
            ret += self.bit[x-1]
            x -= x & -x
            if x <= 0:
                break        
        return ret

    #you can use this function when the BIT has only non-negative values.
    def lower_bound(self, w):
        if w<=0:
            return 0
        x = 0
        k = self.N0
        while k>0:
            if x+k<=self.N:
                if self.bit[x+k-1]<w:
                    w-=self.bit[x+k-1]
                    x+=k
            k//=2
        return x


N,Q = list(map(int,input().split()))
A = list(map(int,input().split()))
bit = BIT(A)

for i in range(Q):
    f,a,b = list(map(int,input().split()))
    if f==0:
        bit.add(a, b)
    else:
        if a==0:
            print(bit.sum(b-1))
        else:
            print(bit.sum(b-1)-bit.sum(a-1))
from sys import stdin
H,W = [int(x) for x in stdin.readline().rstrip().split()]
C = []
for _ in range(N):
    C.append((input()))
for i in C:
    print(i)
    print(i)

### FIXED CODE ###

from sys import stdin
H,W = [int(x) for x in stdin.readline().rstrip().split()]
C = []
for _ in range(H):
    C.append((input()))
for i in C:
    print(i)
    print(i)
# input
h, w = [int(i) for i in input().split()]
ary = []
for y in range(h):
    line = input()
    ary.append(line)

pass


max_val = pow(10, 6)

def convert_ary(ary):
    # #. -> 0, 1, 2
    tmp = [[] for i in range(w)]
    for y in range(h):
        for x in range(w):
            tmp[y].append(None if ary[y][x] == '.' else 0)

    return tmp

ary = convert_ary(ary)

def upd_left(ary, y, x):
    if x == 0:
        return ary
    if ary[y][x-1] is None:
        ary[y][x-1] = ary[y][x] + 1
    else:
        ary[y][x-1] = min(ary[y][x-1], ary[y][x] + 1)
    return ary

def upd_right(ary, y, x):
    if x == w - 1:
        return ary
    if ary[y][x+1] is None:
        ary[y][x+1] = ary[y][x] + 1
    else:
        ary[y][x+1] = min(ary[y][x+1], ary[y][x] + 1)
    return ary

def upd_up(ary, y, x):
    if y == 0:
        return ary
    if ary[y-1][x] is None:
        ary[y-1][x] = ary[y][x] + 1
    else:
        ary[y-1][x] = min(ary[y-1][x], ary[y][x] + 1)
    return ary

def upd_down(ary, y, x):
    if y == h - 1:
        return ary
    if ary[y+1][x] is None:
        ary[y+1][x] = ary[y][x] + 1
    else:
        ary[y+1][x] = min(ary[y+1][x], ary[y][x] + 1)
    return ary

from copy import deepcopy

def update_ary(ary):
    tmp = deepcopy(ary)
    for y in range(h):
        for x in range(w):
            if ary[y][x] is None:
                continue
            tmp = upd_left(ary, y, x)
            tmp = upd_right(ary, y, x)
            tmp = upd_up(ary, y, x)
            tmp = upd_down(ary, y, x)
    return tmp

def is_complete(ary):
    for line in ary:
        if None in line:
            return False
    return True

while not is_complete(ary):
    ary = update_ary(ary)

print(max(elem for line in ary for elem in line))


### FIXED CODE ###

# input
h, w = [int(i) for i in input().split()]
ary = []
for y in range(h):
    ary.append([None if i == '.' else 0 for i in input()])


from collections import deque

update_q = deque((y, x) for y, line in enumerate(ary) for x, elem in enumerate(line) if elem == 0)

def update(ary, update_q):
    for _ in range(len(update_q)):
        pos = update_q.popleft()
        y, x = pos
        if x > 0:
            uy, ux = y, x-1
            if ary[uy][ux] is None:
                ary[uy][ux] = ary[y][x] + 1
                update_q.append((uy, ux))
        if x < w-1:
            uy, ux = y, x+1
            if ary[uy][ux] is None:
                ary[uy][ux] = ary[y][x] + 1
                update_q.append((uy, ux))
        if y > 0:
            uy, ux = y-1, x
            if ary[uy][ux] is None:
                ary[uy][ux] = ary[y][x] + 1
                update_q.append((uy, ux))
        if y < h-1:
            uy, ux = y+1, x
            if ary[uy][ux] is None:
                ary[uy][ux] = ary[y][x] + 1
                update_q.append((uy, ux))
    return ary, update_q


black_count = len(update_q)
update_count = 0
while black_count < w * h:
    ary, update_q = update(ary, update_q)
    black_count += len(update_q)
    update_count += 1


print(update_count)
print(x ** 3)


### FIXED CODE ###

print(int(input()) ** 3)
N=int(input())
a=[input() for i in range(N)]
print(collections.Counter(a))

### FIXED CODE ###

import collections
N=int(input())
a=[]
for i in range(N):
  a.append(input())
print(len(collections.Counter(a)))
# import sys
# sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def lcm(x, y):
  return (x * y) // gcd(x, y)

from math import ceilf
from fractions import gcd

def solve():
    a, b, c, d = MI()

    e = b // c
    f = ceil(a / c)
    c2 = e - f + 1
    g = b // d
    h = ceil(a / d)
    d2 = g - h + 1

    cd = lcm(c, d)
    cdr = b // cd
    cdl = ceil(a / cd)
    cd2 = cdr - cdl + 1
    # print(c2, d2, cd2)
    print(b - a + 1 - c2 - d2 + cd2)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): return k.join(list(map(str, lst)))
INF = float('inf')

from fractions import gcd
def lcm(x, y):
    return x // gcd(x, y) * y

def f(x, c, d):
    r = x
    r -= x // c
    r -= x // d
    r += x // lcm(c, d)
    return r

def f2(n, C, D):
    return n - n//C - n//D + n//lcm(C, D)

def solve():
    a, b, c, d = MI()

    # g = lcm(c, d)
    # bb = b - (b // c) - (b // d) + (b // g)
    # a = a - 1
    # aa = a - (a // c) - (a // d) + (a // g)
    # print(bb - aa)
    print(f(b, c, d) - f(a-1, c, d))
    # print(f2(b, c, d) - f2(a-1, c, d))


if __name__ == '__main__':
    solve()
#import sys
#sys.setrecursionlimit(99999999)


[n,m]=list(map(int,input().split()))
friends=[]
for i in range(m):
    friends.append(list(map(int,input().split())))

tomodachi=[[]for i in range(n)]

for i in range(m):
    tomodachi[friends[i][0]-1].append(friends[i][1]-1)
    tomodachi[friends[i][1]-1].append(friends[i][0]-1)

for i in range(n):
    tomodachi[i]=list(set(tomodachi[i]))

namelist=[1 for i in range(n)]
teams=[]

def haba(x,kari,tomodachi,namelist):
    for i in range(len(tomodachi[x])):
        if namelist[tomodachi[x][i]]==1:#生き残っているなら
            kari.append(tomodachi[x][i])
            namelist[tomodachi[x][i]]=0#殺す
            haba(tomodachi[x][i],kari,tomodachi,namelist)
    return(kari)
            


for i in range(n):
    if namelist[i]==1:
        teams.append(list(set(haba(i,[i],tomodachi,namelist))))

saidai=0

for i in range(len(teams)):
    if saidai<len(teams[i]):
        saidai=len(teams[i])

ans=saidai

print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(99999999)


[n,m]=list(map(int,input().split()))
friends=[]
for i in range(m):
    friends.append(list(map(int,input().split())))

tomodachi=[[]for i in range(n)]

for i in range(m):
    tomodachi[friends[i][0]-1].append(friends[i][1]-1)
    tomodachi[friends[i][1]-1].append(friends[i][0]-1)

for i in range(n):
    tomodachi[i]=list(set(tomodachi[i]))

namelist=[1 for i in range(n)]
teams=[]

def haba(x,kari,tomodachi,namelist):
    for i in range(len(tomodachi[x])):
        if namelist[tomodachi[x][i]]==1:#生き残っているなら
            kari.append(tomodachi[x][i])
            namelist[tomodachi[x][i]]=0#殺す
            haba(tomodachi[x][i],kari,tomodachi,namelist)
    return(kari)
            


for i in range(n):
    if namelist[i]==1:
        teams.append(list(set(haba(i,[i],tomodachi,namelist))))

saidai=0

for i in range(len(teams)):
    if saidai<len(teams[i]):
        saidai=len(teams[i])

ans=saidai

print(ans)
s = input()
k = int(input())
for i in range(len(s)):
  if s[i] != '1':
    idx = i
    num = s[i]
    break
if idx >= k:
  print(1)
else:
  print(num)

### FIXED CODE ###

s = input()
k = int(input())
if s == '1' * len(s):
  print(1)
  exit()
for i in range(len(s)):
  if s[i] != '1':
    idx = i
    num = s[i]
    break
if idx >= k:
  print(1)
else:
  print(num)
N, K = map(int, input().split())
import math
mod =10**9+7

l = []
l.append(N-K+1)
for i in range(1, K):
  a = l[i-1] * 1/(i+1) * (N-K-i) * 1/(i) * (K-1-i) 
  l.append(int(a))

for j in l:
  print(j%mod)


### FIXED CODE ###

N, K = map(int, input().split())
import math
mod =10**9+7

l = []
l.append(N-K+1)
for i in range(1, K):
  a = l[i-1] * (N-K-i+1) * (K-i) // ((i+1)*i)
  l.append(int(a))

for j in l:
  print(j%mod)
num = list(input().split())
for i in range(6):
  if num[i] == "0":
    print(int(str(i + 1)))


### FIXED CODE ###

num = list(input().split())
for i in range(5):
  if num[i] == "0":
    print(int(str(i + 1)))
a,b,k=map(int,input().split())
l=[int(i) for i in range(a,b+1)]
for i in range(k):
  print(sorted(l)[i])
for i in range(k):
  print(sorted(l)[-k:][i])

### FIXED CODE ###

a,b,k=map(int,input().split())
A=[]
if k>=b-a:
  for i in range(b-a+1):
    print(a+i)
else:
  for i in range(k):
    A.append(a+i)
    if a+i!=b-i:
      A.append(b-i)
  for i in range(len(A)):
    print(sorted(A)[i])