Harryxun/stf_run huggingface dataset:
a, b=map(int,input().split())
print(gcd(a,b))

### FIXED CODE ###

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

def lcm(x, y):
 
   #  获取最大的数
   if x > y:
       lower = y
   else:
       lower = x
 
   while(True):
       if((x % lower == 0) and (y % lower == 0)):
           lcm = x*y//lower
           break 
       lower -= 1
 
   return lcm
print(lcm(a,b))
n=int(input())
t=list(map(int,input().split()))
m=int(input())
p1=[]
x1=[]
for i in range(m):
    p,x=map(int,input().split())
    p1.append(p)
    x1.append(x)
for i in range(m):
    print(sum(t)-t[p1[i]-1]+x1[p1[i]-1])

### FIXED CODE ###

n=int(input())
t=list(map(int,input().split()))
m=int(input())
p1=[]
x1=[]
for i in range(m):
    p,x=map(int,input().split())
    p1.append(p)
    x1.append(x)
for i in range(m):
    print(sum(t)-t[p1[i]-1]+x1[i])
a,b=input().split()
ans=a*b
ans=ans//1
print(int(ans))

### FIXED CODE ###

s=input().split()
a=int(s[0])
b=int(float(s[1])*1000) 
ans=a*b
print(ans//1000)
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
N = int(input())
S = input().strip()
Q = int(input())
T = [()] * (2 * N)

n = 1
while n < N:
    n *= 2

def update(k, a):
    k += n-1
    T[k] = tuple(a)
    while k > 0:
        k = (k - 1) // 2
        T[k] = T[k*2+1] + T[k*2+2]

def query(a, b, k, l, r):
    if r <= a or b <= l:
        return ()
    if a <= l and r <= b:
        return T[k]
    else:
        vl = query(a, b, k*2+1, l, (l+r)//2)
        vr = query(a, b, k*2+2, (l+r)//2, r)
        return vl+vr

for i in range(n-1, n-1+N):
    update(i-n-1, S[i-n-1])

for q in range(Q):
    f, i, c = [x for x in input().strip().split()]
    if f == '1':
        update(int(i)-n-1, c)
    elif f == '2':
        print(len(query(int(i), int(c), 0, 0, n))+1)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
N = int(input())
S = input().strip()
Q = int(input())
n = 1
while n < N:
    n *= 2
T = [0] * (2 * n)

def update(k, a):
    k += n-1
    T[k] = 1 << ord(a) - 97
    while k > 0:
        k = (k - 1) // 2
        T[k] = T[k*2+1] | T[k*2+2]

def query(a, b, k, l, r):
    # print(a, b, k, l, r)
    if r <= a or b <= l:
        # print('  ', set())
        return 0
    if a <= l and r <= b:
        # print('  ', T[k])
        return T[k]
    else:
        vl = query(a, b, k*2+1, l, (l+r)//2)
        vr = query(a, b, k*2+2, (l+r)//2, r)
        return vl | vr

for i in range(N):
    update(i, S[i])

for q in range(Q):
    f, i, c = [x for x in input().strip().split()]
    if f == '1':
        # print(T,T[int(i)-1])
        update(int(i)-1, c)
    elif f == '2':
        # print(int(i)-1, int(c)-1)
        tmp = query(int(i)-1, int(c), 0, 0, n)
        ans = 0
        for i in range(26):
            ans += tmp >> i & 1
         
        print(ans)
import math
N = int(input())
A = list(map(int, input().split()))
L = [0] * N
R = [0] * N
for i in range(N - 1):
    L[i + 1] = math.gcd(L[i], A[i])
for i in range(N - 1, 0, -1):
    R[i - 1] = math.gcd(R[i], A[i])
ans = 0
for i in range(N):
    ans = max(math.gcd(L[i], R[i]), ans)
print(ans)

### FIXED CODE ###

from fractions import gcd
N = int(input())
A = list(map(int, input().split()))
L = [0] * N
R = [0] * N
for i in range(N - 1):
    L[i + 1] = gcd(L[i], A[i])
for i in range(N - 1, 0, -1):
    R[i - 1] = gcd(R[i], A[i])
ans = 0
for i in range(N):
    ans = max(gcd(L[i], R[i]), ans)
print(ans)
# coding: utf-8
# Your code here!

import copy

string = [*input()]

concat_string = copy.copy(string)
count = 0
while True:
    num_delete = 0
    flags_delete = [False] * len(string)
    
    i = 0
    j = 1
    while i < len(concat_string) - 1:
        if concat_string[i] != concat_string[j]:
            flags_delete[i] = True
            flags_delete[j] = True
            num_delete += 2
            
            if i == 0:
                i = j + 1
                j = i + 1
            else:
                i = i - 1
                j = j + 1
        else:
            i = j
            j = i + 1
           
    if num_delete == 0:
        break
    
    count += num_delete
    concat_string = [concat_string[i] for i in range(len(concat_string)) if flags_delete[i] == False]

print(count)
        
        

### FIXED CODE ###

# coding: utf-8
# Your code here!

import copy

string = [x for x in input()]

concat_string = copy.copy(string)
num_delete = 0

i = 0
j = 1
not_delete_list = []
while True:
    if j >= len(concat_string) or i < 0:
        break
    if concat_string[i] != concat_string[j]:
        num_delete += 2
        
        if i == 0:
            i = j + 1
            j = i + 1
        else:
            if len(not_delete_list) > 0:
                i = not_delete_list.pop(-1)
                j = j + 1
            else:
                i = j + 1
                j = i + 1
    else:
        not_delete_list.append(i)
        i = j
        j = i + 1


print(num_delete)
N = int(input())
S = input()
 
num = 0
for i in range(N-2):
  if S[i:i+2] = "ABC":
    num += 1
  else:
    num += 0
print(num)

### FIXED CODE ###

N = int(input())
S = str(input())

num = 0
for i in range(N-2):
  if S[i:i+3] == "ABC":
    num += 1
  else:
    num += 0
print(num)
import numpy as np
N = int(input())
a = [1, 2, 4, 8, 16, 32, 64]
b = []
for i in range(len(a)):
    if a[i]<=N:
        b.append(a[i])
print(max(b))

### FIXED CODE ###

N = int(input())
a = [1, 2, 4, 8, 16, 32, 64]
b = []
for i in range(len(a)):
    if a[i]<=N:
        b.append(a[i])
print(max(b))
s = input()
K = int(input())
result = []
alphabet = list("abcdefghijklmnopqrstuvwxyz")

for u in alphabet:
    for i in range(len(s)):
        if s[i] == u:
            for j in range(min(K, len(s) - i)):
                result.append(s[i:i + j + 1])
    if len(result) > K:
        break
result = list(set(result))
result.sort()
print(result[K - 1])


### FIXED CODE ###

s = input()
K = int(input())
subs = []
for i in range(0, len(s)):
    for j in range(i + 1, K + i + 1 if i + K <= len(s) else len(s) + 1):
        subs.append(s[i:j])


subs = list(set(subs))

subs.sort()
print(subs[K - 1])
n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(m)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())

for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]

for _ in result:
    print(_)

### FIXED CODE ###

n,m=[int(x) for x in input().split()]
A=[[0 for i in range(m)] for i in range(n)]
vector=[0 for i in range(m)]
result=[0 for i in range(n)]
for i in range(n):
    A[i]=[int(x) for x in input().split()]
for i in range(m):
    vector[i]=int(input())
for i in range(n):
    for j in range(m):
        result[i] += A[i][j]*vector[j]
for _ in result:
    print(_)
retu = input()
gyo1 = list(map(int,input().split()))
gyo2 = list(map(int,input().split()))
goal=[]
for i in range(retu):
    kai = sum(gyo1[0:i+1]) + sum(gyo2[i:])
    goal.append(kai)
print(max(goal))
    

### FIXED CODE ###

# coding: utf-8
# hello worldと表示する
# coding: utf-8
# hello worldと表示する
retu = int(input())
gyo1 = list(map(int,input().split()))
gyo2 = list(map(int,input().split()))
num = 0
kai=0
boss=[]
for i in range(retu):
    for ii in range(i + 1):
        num += gyo1[ii]
    for iii in range(retu-i):
        num += gyo2[iii+i]
    boss.append(num)
    num=0
#print(boss)
oss = sorted(boss)
print(oss[retu-1])
num = input()
num_list = list(map(int, input().split()))sort()
i = 0
sum = 0
while i < num * 2:
  sum += num_list[i]
  i += 2
print(sum)

### FIXED CODE ###

num = int(input())
num_list = sorted(list(map(int, input().split())))
i = 0
sum = 0
while i < num * 2:
  sum += num_list[i]
  i += 2
print(sum)
while True:
     x=int(input())
     print(x)
     if x=0: 
          break


### FIXED CODE ###


a=0
while True:
     x=int(input())
     a+=1
     if x ==0 : break
     print("Case {}: {}".format(a,x))
print('2018',sep='' ,input()[4:])

### FIXED CODE ###

print('2018', input()[4:], sep='')
s=list(input())
s.sort()
j=0
if len(s) == 1:j=0
else: j=1
for i in s:
    if j == len(s)-1:print("yes")
        break
    if i == s[j]:print("no")
        break
    j+=1

### FIXED CODE ###

l=list(input())
e=set(l)
if len(l)-len(e) == 0:
    print("yes")
else:
    print("no")
import fractions
n,m=map(int,input().split())
s=str(input())
t=str(input())
f=fractions.gcd(n,m)
f2=n*m//f
#print(f2)
for i in range(f2,n*m+1,f2):
    z2=(i//n)*(i//m)//fractions.gcd(i//n,i//m)
    #print(i,z2)
    for j in range(1,i+1,z2):
        if s[j//(i//n)]!=t[j//(i//m)]:
            break
    else:
        print(i)
        break
else:
    print(-1)

### FIXED CODE ###

import fractions
n,m=map(int,input().split())
s=str(input())
t=str(input())
f=fractions.gcd(n,m)
f2=n*m//f
#print(f2)
for i in range(f2,n*m+1,f2):
    z2=(i//n)*(i//m)//fractions.gcd(i//n,i//m)
    for j in range(1,i+1,z2):
        #print(i,j)
        if s[-(-j//(i//n))-1]!=t[-(-j//(i//m))-1]:
            break
    else:
        print(i)
        break
else:
    print(-1)
n=int(input())
a=map(int,input().split())
ans=0
while 1:
  for i in range(n):
    if s[i]%2==0:
      s[i]=s[i]//2
    else:
      break
  else:
    ans=ans+1
    continue
  break
print(ans)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=0
while 1:
  for i in range(n):
    if a[i]%2==0:
      a[i]=a[i]//2
    else:
      break
  else:
    ans=ans+1
    continue
  break
print(ans)
N, K = map(int, input().split())
numbers = list(map(int, input().split()))

maxvalue = 0
for i in range(N-K):
  number_sum = sum(number[i:i+K-1]
  if number_sum > maxvalue:
    maxvalue = number_sum
    
print(maxvalue)


### FIXED CODE ###

N, K = map(int, input().split())
p = list(map(int, input().split()))

mx = sum(p[:K])
cur = mx
for i in range(N-K):
  cur = cur-p[i]+p[i+K]
  mx = max(mx, cur)
  
ans = (mx+K) / 2
print(ans)
n=input()
n1=n[:2]
n2=n[2:4]
A=int(n1)
B=int(n2)
elif 1<=A and A<=12:
    if 1<=B and B<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 1<=B and B<=12:
        print("YYMM")
    else:
        print("NA")


### FIXED CODE ###

n=input()
n1=n[:2]
n2=n[2:]
A=int(n1)
B=int(n2)
if 0<A<13:
    if 0<B<13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 0<B<13:
        print("YYMM")
    else:
        print("NA")
input = S()
if (S=="abc") or (S=="acb") or (S=="bca") or (S=="cba") or (S=="cab"):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
if (S=="abc") or (S=="acb") or (S=="bca") or (S=="cba") or (S=="bac") or (S=="cab"):
  print("Yes")
else:
  print("No")
A, B = map(int, input().split())
k = 1
s=0
while k < B:
    k += A - 1
    s += 1
print(s)

### FIXED CODE ###

S=input()
T=input()
x=0
for i in range(3):
    if S[i]==T[i]:
        x += 1
print(x)
第六回ドワンゴからの挑戦状　A

N=int(input())

largelist=[]

for i in range(N):
    S=input().split()
    #print(S)
    largelist.append(S)

#print(largelist)

X=input()
answer=0

for i in range(N):
    if X==largelist[i][0]:
        for j in range(i+1,N):
            answer+=int(largelist[j][1])
        
    else:
        temp=0

print(answer)

### FIXED CODE ###

#第六回ドワンゴからの挑戦状　A

N=int(input())

largelist=[]

for i in range(N):
    S=input().split()
    #print(S)
    largelist.append(S)

#print(largelist)

X=input()
answer=0

for i in range(N):
    if X==largelist[i][0]:
        for j in range(i+1,N):
            #print("now j")
            #print(j)
            answer+=int(largelist[j][1])
        
    else:
        temp=0

print(answer)
while 1:
    d, w = map(int, input().split())
    if d == w == 0:
        break
    E = [[*map(int, input().split())] for i in range(d)]
    ans = 0
    for x2 in range(d):
        for y2 in range(w):
            for x1 in range(x2-1):
                for y1 in range(y2-1):
                    # [x1, x2] x [y1, y2]
                    co = 10**18
                    for x in range(x1, x2+1):
                        co = min(co, E[x][y1], E[x][y2])
                    for y in range(y1, y2+1):
                        co = min(co, E[x1][y], E[x2][y])
                    ci = 0
                    cnt = 0
                    for x in range(x1+1, x2):
                        for y in range(y1+1, y2):
                            ci = max(ci, E[x][y])
                            cnt += E[x][y]
                    if ci < co:
                        ans = max(ans, (x2-x1-1)*(y2-y1-1)*co - cnt)
    print(ans)

### FIXED CODE ###

while 1:
    d, w = map(int, input().split())
    if d == w == 0:
        break
    E = [list(map(int, input().split())) for i in range(d)]
    ans = 0
    for x2 in range(d):
        for y2 in range(w):
            for x1 in range(x2-1):
                for y1 in range(y2-1):
                    co = 10**18
                    for x in range(x1, x2+1):
                        co = min(co, E[x][y1], E[x][y2])
                    for y in range(y1, y2+1):
                        co = min(co, E[x1][y], E[x2][y])
                    ci = cnt = 0
                    for x in range(x1+1, x2):
                        for y in range(y1+1, y2):
                            ci = max(ci, E[x][y])
                            cnt += E[x][y]
                    if ci < co:
                        ans = max(ans, (x2-x1-1)*(y2-y1-1)*co - cnt)
    print(ans)
NM = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

N = NM[0]
M = NM[1]

if NM >= sum(A):
  print(NM-sum(A))
else:
  print(-1)


### FIXED CODE ###

NM = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

N = NM[0]
M = NM[1]

if N >= sum(A):
  print(N-sum(A))
else:
  print(-1)
from math import gcd
n,m=map(int,input().split())
a=[i//2 for i in set(list(map(int,input().split())))]
l=1
for i in a:
    l=l*i//gcd(i,l)
print((m//l+1)//2)

### FIXED CODE ###

from fractions import gcd
n,m=map(int,input().split())
a=[i//2 for i in set(list(map(int,input().split())))]
b=[]
for i in a:
    c=i
    p=0
    while c%2==0:
        c//=2
        p+=1
    b.append(p)
l=1
if len(set(b))==1:
    for i in a:
        l=l*i//gcd(i,l)
        if m<l:
            print(0)
            break
    else:
        print((m//l+1)//2)
else:
    print(0)
"""
    Author : thekushalghosh
    Team   : CodeDiggers
"""
import sys,math,cmath,time
start_time = time.time()
################# ---- USER DEFINED INPUT FUNCTIONS ---- #################
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(s[:len(s) - 1])
def invr():
    return(map(int,input().split()))
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    n = inp()
    c = 0
    for i in range(1,201):
        for j in range(1,201):
            for k in range(1,201):
                c = c + math.gcd(math.gcd(a,b),c)
    print(c)
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
ONLINE_JUDGE = __debug__
if not ONLINE_JUDGE:
    sys.stdin = open('input.txt','r')
    sys.stdout = open('output.txt','w')
else:
    input = sys.stdin.readline
t = 1
for tt in range(t):
    solve()
if not ONLINE_JUDGE:
    print("Time Elapsed:",time.time() - start_time,"seconds")
sys.stdout.close()

### FIXED CODE ###

"""
    Author : thekushalghosh
    Team   : CodeDiggers
"""
import sys,math,cmath,time
start_time = time.time()
################# ---- USER DEFINED INPUT FUNCTIONS ---- #################
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(s[:len(s) - 1])
def invr():
    return(map(int,input().split()))
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    n = inp()
    c = 0
    for i in range(1,n + 1):
        for j in range(1,n + 1):
            for k in range(1,n + 1):
                c = c + math.gcd(math.gcd(i,j),k)
    print(c)
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
ONLINE_JUDGE = __debug__
if not ONLINE_JUDGE:
    sys.stdin = open('input.txt','r')
    sys.stdout = open('output.txt','w')
else:
    input = sys.stdin.readline
t = 1
for tt in range(t):
    solve()
if not ONLINE_JUDGE:
    print("Time Elapsed:",time.time() - start_time,"seconds")
sys.stdout.close()
# Library
import bisect

alp = "abcdefghijklmnopqrstuvwxyz"
#

s = input()
t = input()
ss = s * 2
index = 0
cir = 0
letter = []
res = 0

for i in range(len(ss)):
    letter.append([ss[i], i])

# Sort出来る.
letter.sort()

for i in range(len(t)):
    search = [t[i], index]
    tmp_ind = bisect.bisect(letter, search)
    # print("now searching " + str(search))
    # print("find: " + str(tmp_ind))
    # print("found: " + str(letter[tmp_ind]))
    if t[i] != letter[tmp_ind][0]:
        # Not exist
        res = -1
        break
    index += (letter[tmp_ind][1] - index)
    if index >= len(s):
        cir += 1
        index -= len(s)
    # print("cir,index : " + str(cir) + " " + str(index))
    res = cir * len(s) + index + 1

print(res)


### FIXED CODE ###

# Library
import bisect

alp = "abcdefghijklmnopqrstuvwxyz"
#

s = input()
t = input()
ss = s * 2
index = -1
cir = 0
letter = []
res = 0

for i in range(len(ss)):
    letter.append([ss[i], i])

# Sort出来る.
letter.sort()

for i in range(len(t)):
    search = [t[i], index]
    tmp_ind = bisect.bisect(letter, search)
    # print("now searching " + str(search))
    # print("find: " + str(tmp_ind))
    # print("found: " + str(letter[tmp_ind]))
    if tmp_ind == len(ss):
        res = -1
        break
    if t[i] != letter[tmp_ind][0]:
        # Not exist
        res = -1
        break
    index += (letter[tmp_ind][1] - index)
    if index >= len(s):
        cir += 1
        index -= len(s)
    # print("cir,index : " + str(cir) + " " + str(index))
    res = cir * len(s) + index + 1

print(res)
S = list(input())
S_len = len(S)


def dfs(S):
    slen = len(S)
    for i in range(slen -1 ):
        if S[i] != S[i+1]:
            del S[i+1:i+2]
            dfs(S)
            break;
    End_len = len(S)
    ans = S_len - End_len
    return ans

if __name__ == '__main__':
    print(dfs(S))

### FIXED CODE ###

s = input()
count_0 = s.count('0')
count_1 = s.count('1')
print(2*min(count_0,count_1))
c = N * (N + 1 )/2

print(c)

### FIXED CODE ###

N = int( input() )

candy = int( N * ( N + 1 ) / 2 )

print(candy)
n = int(input())
# リスト内包表記
numList  = [input() for i in range(n)]

workList = numList.copy()
for j in range(n):
  workList.remove(numList[j])
  print(max(set(workList)))
  workList = numList.copy()

### FIXED CODE ###

n = int(input())
numList  = [int(input()) for i in range(n)]
maxVal = max(numList)
workList = numList[:]
workList.remove(maxVal)
secondVal = max(workList)
for num in numList:
  if num != maxVal:
    print(maxVal)
  else:
    print(secondVal)
x, a, b = map(int, input().split())

if |x - a| >= |x-b|:
  print('A')

else:
  print('B')

### FIXED CODE ###

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

if abs(x - a) >= abs(x - b):
  print('B')

else:
  print('A')
N = int(input())
a = list(map(int,input().split()))
count = 0
for i in range(len(a)):
  while i+1 != a[i]:
    a.pop(i)
    count += 1
    if a == []:
      print(-1)
      exit()
  if len(a) == a[-1]:
    print(count)
    exit()


### FIXED CODE ###

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

for i in range(N):
  if j == a[i]:
    j += 1
if j == 1:
  print(-1)
else:
  print(N-j+1)
L = int(input())
print(L/3 * L/3 * L/3)

### FIXED CODE ###

import math

def comb(n, r):
    try: 
        return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
    except:
        return 0

raw = input()
n, m = [int(i) for i in raw.split(" ")]
 
print(comb(n, 2) + comb(m, 2))
from collections import deque

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

for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    u[a].append(b)
    u[b].append(a)

q = deque([0])
ans = [-1] * n
count = 0

while len(q):
    p = q.popleft()
    for x in u[p]:
        if ans[x] == -1:
            ans[x] = p+1
            q.append(x)
    print(q)

ans[0] = 'Yes'

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

### FIXED CODE ###

from collections import deque

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

for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    u[a].append(b)
    u[b].append(a)

q = deque([0])
ans = [-1] * n
count = 0

while len(q):
    p = q.popleft()
    for x in u[p]:
        if ans[x] == -1:
            ans[x] = p+1
            q.append(x)

ans[0] = 'Yes'

for i in range(n):
    print(ans[i])
number = len(input())
print(x * number)

### FIXED CODE ###

number = len(input())
print('x' * number)
import math
from fractions import Fraction

N = int(input())
a, b = map(int, input().split())
ret_a = a
ret_b = b
for _ in range(1, N):
    a, b = map(int, input().split())
    x = math.ceil(max(Fraction(ret_a, a), Fraction(ret_b, b)))
    ret_a = a * x
    ret_b = b * x
print(ret_a + ret_b)


### FIXED CODE ###

s = set([x for x in input().split()])
print(len(s))
import sys
import collections
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    n = I()
    mylist = sorted(list(MI()))
    max_num = mylist[n-1] // 2
    start = mylist[0]
    input_list = [0] * n
    index = 0

    while len(mylist) >= 1:
        temp = mylist.pop(0)
        if not(temp in mylist):
            index += 1
        for j in set(mylist):
            if j % temp == 0:
                while j in mylist:
                    mylist.remove(j)
        if mylist[0] > max_num:
            break
    print(index+len(mylist)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import collections
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    n = I()
    mylist = list(MI())
    max_a = max(mylist)
    exclude_set = set()
    tlist = [False] * (max_a+1)
    for a in mylist:
        if tlist[a]:
            exclude_set.add(a)
        else:
            tlist[a] = True
    ans = 0
    
    for i in range(1, max_a//2 + 1):
        if not tlist[i]:
            continue
        else:
            for j in range(2*i, max_a+1, i):
                tlist[j]=False
    for i in range(len(tlist)):
        if tlist[i] and not i in exclude_set:
            ans += 1
    print(ans)
                
    

if __name__ == '__main__':
    main()
A = int(input())
B = int(input())
C = int(input())
X = int(input())

count = 0
a = 0
b = 0

for i in range(min(C, int(X/500)) + 1):
    a = X - 500 * i
    for j in range(min(B, int(a/100)) + 1):
        b = a - 100 * j
        if int(b/50) <= C:
            count += 1
        else:
            pass

print(count)


### FIXED CODE ###

x = int(input())
a = int(input())
b = int(input())

x -= a
x %= b
print(x)
n = input()
answer = 0
for i in range(1, n+1):
  str(i)
  if len(i) % 2 != 0:
    answer += 1
    
print(answer)

### FIXED CODE ###

n = int(input())
answer = 0
for i in range(1, n + 1):
    if not len(str(i)) % 2 == 0:
        answer += 1
print(answer)
import numpy as np
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

N, X = map(int, input().split(' '))
city = np.array(list(map(int, input().split(' '))))

city -= X
print(gcd(*city))

### FIXED CODE ###

import numpy as np
import math
from functools import reduce

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

    return a

def multi_gcd(*numbers):
    return reduce(gcd, numbers)

N, X = map(int, input().split(' '))
city = np.array(list(map(int, input().split(' '))))

city -= X
print(abs(multi_gcd(*city)))
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
x,y = map(int, input().split())
if (x in a and y in a) or (x in b and y in b):

### FIXED CODE ###

a = [1,3,5,7,8,10,12]
b = [4,6,9,11]
x,y = map(int, input().split())
if (x in a and y in a) or (x in b and y in b):
  print("Yes")
else:
  print("No")