Harryxun/stf_run huggingface dataset:
n = int(input())

intCount = 0

for idx in range(1, n+1):
    if len(str(idx) % 2 == 1:
        intCount += 1

print(intCount)

### FIXED CODE ###

n = int(input())

if n < 10:  # < 10^1
    # 1-n
    print(n)

elif n < 100:  # < 10^2
    # 1-9
    print(9)

elif n < 1000:  # < 10^3
    # 1-9, 100-n
    print(n-99+9)

elif n < 10000:  # < 10^4
    # 1-9, 100-999
    print(9+900)

elif n < 100000:  # < 10^5
    # 1-9 + 100-999 + 10000-n
    print(n-9999+900+9)

else:  # == 10^5
    # 1-9 + 100-999 + 10000-90000
    print(9+900+90000)
# -*- coding: utf-8 -*-
# モジュールのインポート
import math
import numpy as np

# 標準入力の取得
A, B, N = list(map(int, input().split()))


def func(x: np.ndarray) -> np.ndarray:
    return np.floor(A*x/B) - A*np.floor(x/B)


# 求解処理
MAX_VALUE = pow(10, 5)
result = 0
for i in range((N//MAX_VALUE)+1):
    x = np.array([])
    if i == 0:
        x = np.arange(min(N, B-1), min(N, MAX_VALUE)+1, B)
    else:
        x = np.arange(MAX_VALUE*i, min(N, MAX_VALUE*(i+1))+1, B)
    x = func(x)
    result = max(result, int(np.max(x)))

# 結果出力
print(result)


### FIXED CODE ###

# -*- coding: utf-8 -*-
# モジュールのインポート
import math

# 標準入力の取得
A, B, N = list(map(int, input().split()))


def f(x: int) -> int:
    return math.floor(A*x/B) - A*math.floor(x/B)


# 求解処理
result = f(min(B-1, N))

# 結果出力
print(result)
N-int(input())
s=list(map(int, input().split()))
ans=0
for i in range(N-1):
    if i==0:
        ans=s[0]
    else:
        ans=((ans+s[i])/2)
print(ans)

### FIXED CODE ###

N=int(input())
s=list(map(int, input().split()))
s.sort()
ans=s[0]
for i in range(N-1):
    ans=((ans+s[i+1])/2)
print(ans)
import sys

import numpy as np

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(" ")]

total = 0
ret = 1
n = readInt()
aa = []
for i in range(n):
    v = readInt()
    aa.append(v)
    total += v
    ret = (ret * 3) % 998244353

memo0 = [[-1] * 100000 for _ in range(300)]
def dfs0(i, c):
    if 0 <= memo0[i][c]:
        return memo0[i][c]

    if i == len(aa):
        memo0[i][c] = 3 if total <= (2 * c) else 0
        return memo0[i][c]

    acc = max(0, memo0[i][c])
    acc = (acc + dfs0(i + 1, c)) % 998244353
    acc = (acc + dfs0(i + 1, c)) % 998244353
    acc = (acc + dfs0(i + 1, c + aa[i])) % 998244353
    memo0[i][c] = acc
    return memo0[i][c]

memo1 = [[-1] * 100000 for _ in range(300)]
def dfs1(i, c):
    if 0 <= memo1[i][c]:
        return memo1[i][c]

    if i == len(aa):
        memo1[i][c] = 3 if total == (2 * c) else 0
        return memo1[i][c]

    acc = max(0, memo1[i][c])
    acc = (acc + dfs1(i + 1, c)) % 998244353
    acc = (acc + dfs1(i + 1, c + aa[i])) % 998244353
    return memo1[i][c]

ret = (ret - dfs0(0, 0)) % 998244353
ret = (ret + dfs1(0, 0)) % 998244353
print(ret)

### FIXED CODE ###

import sys

readInt = lambda: int(sys.stdin.readline())
readIntN = lambda: [int(v) for v in sys.stdin.readline().split(" ")]

total = 0
ret = 1
n = readInt()
aa = []
for i in range(n):
    v = readInt()
    aa.append(v)
    total += v
    ret *= 3


L = (n * max(aa) + 1)
memo = [-1] * ((n+1) * L * 2)
def dfs(i, c):
    key = (i * L * 2) + 2 * c
    if 0 <= memo[key]:
        return memo[key: key+2]

    if i == n:
        memo[key + 0] = 3 if total <= (2 * c) else 0
        memo[key + 1] = 3 if total == (2 * c) else 0
        return memo[key: key + 2]

    v0 = dfs(i + 1, c)
    v1 = dfs(i + 1, c + aa[i])

    memo[key + 0] = (2 * v0[0] + v1[0]) % 998244353
    memo[key + 1] = (v0[1] + v1[1]) % 998244353
    return memo[key: key + 2]

a, b = dfs(0, 0)
ret = (ret - a + b) % 998244353
print(ret)
n = str(input())
if n.count(7) >= 1:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

n = str(input())
if n.count("7") >= 1:
    print("Yes")
else:
    print("No")
from sys import stdin

input = stdin.readline().rstrip

#x = input().rstrip()
#n = int(input())

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

D,T,S = input().split()

if(T * S >= D):
	print("Yes")
else:
	print("No")

### FIXED CODE ###


from sys import stdin

input = stdin.readline().rstrip

#x = input().rstrip()
#n = int(input())

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

D,T,S = map(int, input().split(" "))

if(T * S >= D):
	print("Yes")
else:
	print("No")
n, q = map(int, input().split())
ans = [0 for x in range(n)]
g = [list() for x in range(n)]
for i in range (n - 1) :
    v, u = map(int, input().split())
    v -= 1
    u -= 1
    g[v].append(u)
    g[u].append(v)
for i in range (q):
    p, x = map(int, input().split())
    p -= 1;
    ans[p] += x
def dfs(v, p):
    for u in g[v]:
        if (u != p) :
            ans[u] += ans[v]
            dfs(u, v)
dfs(0, -1)
print(*ans)

### FIXED CODE ###

from collections import deque

n, q = map(int, input().split())
ans = [0 for x in range(n)]
g = [list() for x in range(n)]
for i in range (n - 1) :
    v, u = map(int, input().split())
    v -= 1
    u -= 1
    g[v].append(u)
    g[u].append(v)
for i in range (q):
    p, x = map(int, input().split())
    p -= 1;
    ans[p] += x
dq = deque()
dq.append((0, -1))
while (len(dq)) :
    v, p = dq.pop()
    for u in g[v]:
        if (u != p) :
            ans[u] += ans[v]
            dq.append((u, v))
print(*ans)
a,b,c = map(int,input())

print(max(0,a-b-c))


### FIXED CODE ###

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

print(max(0,c-a+b))
import sys
n = int(sys.stdin.readline())
ans = 0
t = 0
for i in range(n):
    a = int(sys.stdin.readline())
    if a==0:
        ans += t//2
        t = 0
    else:
        t += a
if t>0: ans += t//2
pritn(ans)

### FIXED CODE ###

import sys
n = int(sys.stdin.readline())
ans = 0
t = 0
for i in range(n):
    a = int(sys.stdin.readline())
    if a==0:
        ans += t//2
        t = 0
    else:
        t += a
if t>0: ans += t//2
print(ans)
from sys import stdin

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

n = int(stdin.readline().rstrip())
an = list(map(int, input().split()))

left = []
right = []

for i in range(n):
  if(i==0):
    before = an[i]
  else:
    before = gcd(before, an[i])
  left.append(before)

for i in range(n):
  if(i==0):
    before = an[n-1-i]
  else:
    before = gcd(before, an[n-1-i])
  right.append(before)

max = 0
for i in range(n):
  if(i==0):
    before = right[n-2];
  elif(i==(n-1)):
    before = left[n-2];
  else:
    before = gcd(left[i-1],right[n-2-i])
  max = max(before,max)

print(max)

### FIXED CODE ###

from sys import stdin

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

n = int(stdin.readline().rstrip())
an = list(map(int, input().split()))

left = []
right = []

for i in range(n):
  if(i==0):
    before = an[i]
  else:
    before = gcd(before, an[i])
  left.append(before)

for i in range(n):
  if(i==0):
    before = an[n-1-i]
  else:
    before = gcd(before, an[n-1-i])
  right.append(before)

max = 0
for i in range(n):
  if(i==0):
    before = right[n-2];
  elif(i==(n-1)):
    before = left[n-2];
  else:
    before = gcd(left[i-1],right[n-2-i])
  if(max < before ):
    max = before

print(max)
A = input()
B = input()
C = input()

next_turn = A[0]
Acnt = 1
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        if Acnt == len(A)-1:
            print('A')
            break
        next_turn = A[Acnt]
        Acnt += 1

    elif next_turn == 'b':
        if Bcnt == len(B)-1:
            print('B')
            break
        next_turn = B[Bcnt]
        Bcnt += 1

    elif next_turn == 'c':
        if Ccnt == len(C)-1:
            print('C')
            break
        next_turn = C[Ccnt]
        Ccnt += 1

### FIXED CODE ###

A = input()
B = input()
C = input()

next_turn = A[0]
Acnt = 1
Bcnt = 0
Ccnt = 0
while True:
    if next_turn == 'a':
        if Acnt == len(A):
            print('A')
            break
        next_turn = A[Acnt]
        Acnt += 1

    elif next_turn == 'b':
        if Bcnt == len(B):
            print('B')
            break
        next_turn = B[Bcnt]
        Bcnt += 1

    elif next_turn == 'c':
        if Ccnt == len(C):
            print('C')
            break
        next_turn = C[Ccnt]
        Ccnt += 1
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())))
sum_a = sum(a)
if a[n-m] >= sum_a/(4*m):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

a, b, c = map(int, input().split())
tmp = b
b = a
a = tmp
tmp = c
c = a
a = tmp
print(a, b, c)
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
    

### FIXED CODE ###

n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(k):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
import math
import fractions



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

A=list(map(int,input().split()))
B=[]
for i in range(len(A)):
    B.append(A[i]-X)
print(gcd(B))


### FIXED CODE ###

H,W=map(int,input().split())
L=[]

for i in range(H):
    L1=list(map(int,input().split()))
    L.append(L1)
ans=[]
cnt=0
for a in range(H):
    for b in range(W):
        if a%2==0:
            if b<W-1:
                if L[a][b]%2==1:
                    L[a][b]-=1
                    L[a][b+1]+=1
                    ans.append([a+1,b+1,a+1,b+2])
                    cnt+=1
            if b==W-1:
                if a<H-1:
                    if L[a][b]%2==1:
                        L[a][b]-=1
                        L[a+1][b]+=1
                        ans.append([a+1,b+1,a+2,b+1])
                        cnt+=1
        if a%2==1:
            if b<W-1:
                if L[a][W-1-b]%2==1:
                    L[a][W-1-b]-=1
                    L[a][W-1-b-1]+=1
                    ans.append([a+1,W-b,a+1,W-1-b])
                    cnt+=1
            if b==W-1:
                if a<H-1:
                    if L[a][W-1-b]%2==1:
                        L[a][W-1-b]-=1
                        L[a+1][W-1-b]+=1
                        ans.append([a+1,W-b,a+2,W-b])
                        cnt+=1
print(cnt)
for x in range(len(ans)):
    print(ans[x][0],ans[x][1],ans[x][2],ans[x][3])
n,ans,l=int(input()),"Yes",list(map(int,input()))
for i in l:
  if sum(l)<i*2:ans="No"
print(ans)

### FIXED CODE ###

n,ans,l=int(input()),"Yes",list(map(int,input().split()))
for i in l:
  if sum(l)<=i*2:ans="No"
print(ans)
H, N = map(int, input().split())
x = [list(map(int, input().split())) for n in range(N)]
x = [[tmp[i] for tmp in x] for i in range(len(x[0]))]
A = x[0]
B = x[1]

import sys
sys.setrecursionlimit(max(1000, 2**N))

memo = [-1] * (H + 1)
def ibis(H):
    if memo[H] >= 0:
        return memo[H]
    if H <= 0:
        return 0
    mp = [0] * N
    for n in range(N):
        mp[n] = B[n] + ibis(H - A[n])
    memo[H] = min(mp)
    return memo[H]

print(ibis(H))

### FIXED CODE ###

H, N = map(int, input().split())
x = [list(map(int, input().split())) for n in range(N)]
x = [[tmp[i] for tmp in x] for i in range(len(x[0]))]
A = x[0]
B = x[1]

def ibis(H, A, B):
    dp = [max(B) * H] * (H + 1)
    dp[0] = 0
    for h in range(H):
        for n in range(N):
            hp = min(h + A[n], H)
            dp[hp] = min(dp[hp], dp[h] + B[n])
    return dp[H]

print(ibis(H, A, B))
n = int(input())
arr = [0 for i in range(n)]
cnt = list(map(int, input().split()))
for i in range(n):
  arr[cnt[i]] = i+1
print(*arr)

### FIXED CODE ###

n = int(input())
arr = [0 for i in range(n)]
cnt = list(map(int, input().split()))
for i in range(n):
  arr[cnt[i]-1] = i+1
print(*arr)
#!/usr/bin/env python3
import sys
from typing import List


def solve(N: int, K: int, h: "List[int]"):
    persons = 0

    for _h in h:
        if _h >= K:
            persons += 1

    print(persons)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    h = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, h)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, K: int, h: "List[int]"):
    persons = 0

    for _h in h:
        if _h >= K:
            persons += 1

    print(persons)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    h = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, K, h)


if __name__ == '__main__':
    main()
h,w,k = map(int, input().split())

if w == 1:
    print(1)
    exit(0)

case = []

def createCase(s):
    if (len(s) == w-1):
        case.append(s)
        return
    if len(s) != 0 and s[-1] == "1" :
        createCase(s+"0")
    else:
        createCase(s+"0")
        createCase(s+"1")

createCase("")

for i in range(len(case)):
    case[i] = "0"+case[i]+"0"

# print(case)

move = [[0]*3 for _ in range(w)]

for i in range(w):
    for j in case:
        if j[i] == j[i+1] == "0":
            move[i][1] += 1
        if j[i+1] == "1":
            move[i][2] += 1
        if j[i] == "1":
            move[i][0] += 1

# print(move)

dp = [[0]*w for _ in range(h)]

fib = [0, 1, 2, 3, 5, 8, 13, 21]

dp[0][0] = fib[w-1]
dp[0][1] = fib[w-2]

for i in range(1, h):
    dp[i][0] = (dp[i-1][0]*move[0][1] + dp[i-1][1]*move[1][0]) % 1000000007
    for j in range(1, w-1):
        dp[i][j] = (dp[i-1][j]*move[j][1] + dp[i-1][j-1]*move[j-1][2] + dp[i-1][j+1]*move[j+1][0]) % 1000000007
    dp[i][-1] = (dp[i-1][-2]*move[-2][2] + dp[i-1][-1]*move[-1][1]) % 1000000007

# print(dp)

print(dp[-1][k-1])


### FIXED CODE ###

a,b = map(int, input().split())
print(a+b//2)
import sys
n,m=list(map(int,input().split()))
ans=[-1 for i in range(n)]

for i in range(m):
  s,c=list(map(int,input().split()))
  if n!=1 and s==1 and c==0:
    print(-1)
    sys.exit()
  if ans[s-1]==-1 or ans[s-1]==c:
    ans[s-1]=c
  else:
    print(-1)
    sys.exit()

    
if n==1 and ans[0]==0　or -1
  print(0)
  sys.exit()
if ans[0]==-1:
  ans[0]=1
for i in range(1,n):
  if ans[i]==-1:
    ans[i]=0
ans=map(str, ans)
print("".join(ans))

  

### FIXED CODE ###

import sys
n,m=list(map(int,input().split()))
ans=[-1 for i in range(n)]

for i in range(m):
  s,c=list(map(int,input().split()))
  if n!=1 and s==1 and c==0:
    print(-1)
    sys.exit()
  if ans[s-1]==-1 or ans[s-1]==c:
    ans[s-1]=c
  else:
    print(-1)
    sys.exit()

    
if n==1 and (ans[0]==0 or ans[0]==-1):
  print(0)
  sys.exit()
if ans[0]==-1:
  ans[0]=1
for i in range(1,n):
  if ans[i]==-1:
    ans[i]=0
ans=map(str, ans)
print("".join(ans))
def pd(n):
    i = 2
    ans = []
    while i ** 2 <= n:
        while n % i == 0:
            n /= i
            ans.append(i)
        i += 1
    if n > 1:
        ans.append(n)
    return ans

def gcd(a, b):
    gcd = 1
    pd_a = pd(a)
    pd_b = pd(b)
    for i in pd_a:
        if i in pd_b:
            pd_b.remove(i)
            gcd *= i
    return int(gcd)

def lcm(a, b):
    lcm = a
    pd_a = pd(a)
    pd_b = pd(b)
    for i in pd_a:
        if i in pd_b:
            pd_b.remove(i)
    for j in pd_b:
        lcm *= j
    return int(lcm)

while True:
    s = input()
    if not s:
        break
    a,b = [int(i) for i in s.split(' ')]
    print(gcd(a, b), lcm(a, b))


### FIXED CODE ###

def pd(n):
    i = 2
    ans = []
    while i ** 2 <= n:
        while n % i == 0:
            n /= i
            ans.append(i)
        i += 1
    if n > 1:
        ans.append(n)
    return ans

def gcd(a, b):
    gcd = 1
    pd_a = pd(a)
    pd_b = pd(b)
    for i in pd_a:
        if i in pd_b:
            pd_b.remove(i)
            gcd *= i
    return int(gcd)

def lcm(a, b):
    lcm = a
    pd_a = pd(a)
    pd_b = pd(b)
    for i in pd_a:
        if i in pd_b:
            pd_b.remove(i)
    for j in pd_b:
        lcm *= j
    return int(lcm)

while True:
    try:
        s = input()
        a,b = [int(i) for i in s.split(' ')]
    except:
        break
    print(gcd(a, b), lcm(a, b))
N = int(input())
S = input()
S = list(S)

tmp = [0 for _ in range(N+1)]

if S[0] == '.':
    tmp[0] = 1

for i in range(N):
    if S[i] == '.':
        tmp[i+1] = tmp[i] + 1
    else:
        tmp[i+1] = tmp[i]
  
res1 = 10 ** 9
for i in range(N):
    res1 = min((i+1) - tmp[i] + tmp[N] - tmp[i+1], res1)
        
b = 0
w = 0
for i in range(N):
    if S[i] == '#':
        b += 1
    else:
        w += 1

res3 = N - max(b, w)

print(min(res1, res3))

### FIXED CODE ###

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

res = "No"
if B > A:
    for i in range(A, B+1):
        if i == C:
            res = 'Yes'
            break
else:
    for i in range(B, A+1):
        if i == C:
            res = 'Yes'
            break
print(res)
D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(D)]
t = [int(input()) for _ in range(D)]
M = int(input())
dq = [list(map(int, input().split())) for _ in range(M)]

def calc(t, D, s):
  last = [0 for _ in range(26)]
  value = 0
  for i in range(D):
    day = i + 1
    value += s[i][t[i]-1]
    last[t[i]-1] = day
    for j in range(26):
      value -= c[j] * (day - last[j])
  return value

for i in range(M):
  t[dq[i][0]-1] = dq[i][1]
  print(calc(t, D, s))

### FIXED CODE ###

import bisect

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ruiseki_a = [0]
ruiseki_b = [0]

a_index = N+1
for i in range(N):
  if K < ruiseki_a[-1] + A[i]:
    a_index = i+1
    break
  ruiseki_a.append(ruiseki_a[-1] + A[i])
b_index = M+1
for i in range(M):
  if K < ruiseki_b[-1] + B[i]:
    b_index = i+1
    break
  ruiseki_b.append(ruiseki_b[-1] + B[i])
lis = [0 for _ in range(a_index)]
for i in range(a_index):
  index = bisect.bisect_left(ruiseki_b, K-ruiseki_a[i]+1)
  lis[i] = i + max(0, index - 1)
print(max(lis))
N, A, B = map(int, input().split())

counter = [0 for _ in range(N)]
ans = 0
for i in range(N):
    st = str(i)
    for j in range(len(st)):
        counter[i] = counter[i] + st[j]
    if counter[i]>=A and counter[i]<=B :
        ans = ans + i

print(ans)

### FIXED CODE ###

N, A, B = map(int, input().split())
ans = 0

for i in range(1, N+1):
    num_sum = 0
    for j in str(i):
        num_sum += int(j)
    if A<= num_sum <= B:
        ans += i

print(ans)
N = int(input())
A = [int(ai) for ai in input().split()]
ans = 1
if 0 in A:
  print(0)
else:
  for ai in A:
    ans *= ai
  if ans > 10**18:
    print(-1)
    break
  else:
    print(ans)



### FIXED CODE ###

n =int(input())
ls =[]
ls =list(map(int,input().split()))
if 0 in ls:
	print(0)
else:
	ans = 1
	for a in ls:
		ans *= a
		if ans > 10 ** 18:
			ans = -1;
			break
		
	print(ans)
A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[input().split() for l in range(M)]
tot_1=min(a)+min(b)
lis=[]
for i in range(M):
    tot=a[int(x[i][0])]+b[int(x[i][1])]-int(x[i][2])
    lis.append(tot)
if tot_1<=min(lis):
    print(tot_1)
else:
    print(min(lis))

### FIXED CODE ###

A,B,M=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x=[input().split() for l in range(M)]
tot_1=min(a)+min(b)
lis=[]
for i in range(M):
    tot=a[int(x[i][0])-1]+b[int(x[i][1])-1]-int(x[i][2])
    lis.append(tot)
if tot_1<=min(lis):
    print(tot_1)
else:
    print(min(lis))
from sys import stdin
d,n=[int(x) for x in stdin.readline().rstrip().split()]
x=1
for i in range(d):
    x*=100
ans=0
for i in range(n):
    ans+=x
    if(ans%(x*100))==0)ans+=x
print(ans)

### FIXED CODE ###

from sys import stdin
d,n=[int(x) for x in stdin.readline().rstrip().split()]
x=1
for i in range(d):
    x*=100
ans=0
if (n==100):
    n+=1

for i in range(n):
    ans+=x
print(ans)
import sys


def isprime(n):
    '''check if integer n is a prime'''

    # make sure n is a positive integer
    n = abs(int(n))

    # 0 and 1 are not primes
    if n < 2:
        return False

    # 2 is the only even prime number
    if n == 2: 
        return True    

    # all other even numbers are not primes
    if not n & 1: 
        return False

    # range starts with 3 and only needs to go up 
    # the square root of n for all odd numbers
    for x in range(3, int(n**0.5) + 1, 2):
        if n % x == 0:
            return False

    return True


max = sys.stdin.readline()
answer = []

for x in [0..max-1]:
    n = sys.stdin.readline()
    if isprime(n):
        answer.append(n)

for x in answer:
    print(x + " ")

### FIXED CODE ###

import sys


def isprime(n):
    '''check if integer n is a prime'''

    # make sure n is a positive integer
    n = abs(int(n))

    # 0 and 1 are not primes
    if n < 2:
        return False

    # 2 is the only even prime number
    if n == 2: 
        return True    

    # all other even numbers are not primes
    if not n & 1: 
        return False

    # range starts with 3 and only needs to go up 
    # the square root of n for all odd numbers
    for x in range(3, int(n**0.5) + 1, 2):
        if n % x == 0:
            return False

    return True


max = int(sys.stdin.readline())
answer = 0

for x in range(max):
    n = sys.stdin.readline()
    if isprime(int(n)):
        answer += 1

print(answer)
import math
N=int(input())
print(math.factorial(N)/(10**9+7))

### FIXED CODE ###

import math
N=int(input())
print(math.factorial(N)%(7+10**9))
N=int(input())
s=list(str(input()))

def dp(i,ans):
  if i==N-1:
    return ans+1
  if s[i]!=s[i+1]:
    ans+=1
    return dp(i+1,ans)
  else:
    count=2
    ans+=1
    while i+count<=N-1 and s[i]==s[i+count]:
      count+=1
    if i+count==N:
      return ans
    if i+count==N-1 and s[N-2]!=s[N-1]:
      ans+=1
      return ans
    return dp(i+count,ans)
  
ans=0
print(dp(0,ans))

### FIXED CODE ###

import sys
N=int(input())
s=list(str(input()))
i=0
ans=0
if N==1:
  print(1)
  sys.exit()
while i!=N-1:
  count=1
  ans+=1
  while i+count<=N-1 and s[i]==s[i+count]:
    count+=1
  i+=count
  if i==N:
    print(ans)
    sys.exit()
  elif i==N-1:
    if s[N-2]!=s[N-1]:
      ans+=1
    print(ans)
    sys.exit()
print(ans)
import sys
l = []
c = list([0] * 100)
for i in sys.stdin.readlines():
    c[int(i)] += 1
m = max(c)
for i in xrange(c.count(m)):
    i = c.index(m)
    print i + 1
    c.pop(i)

### FIXED CODE ###

l = []
c = list([0] * 100)
while True:
    try:
        c[int(raw_input()) - 1] += 1
    except:
        break
m = max(c)
for i in xrange(c.count(m)):
    j = c.index(m)
    print j + 1
    c[j] = 0
n = int(input())

print((n-1)(n-2)/2)

### FIXED CODE ###

n = int(input())
h = list(map(lambda x: int(x), input().split(" ")))

ans = 0

kari = 0
i = 0
for m in range(0,n-1):
	if h[m] >= h[m+1]:
		kari += 1
	else:
		kari = 0
	if ans < kari:
		ans = kari



print(ans)
#c

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

for i in range(1,n+1):
    a[i-1] -= i
num1 = a[int(n/2)]
num2 = a[int(n/2)+1]

ans1 = 0
for i in range(n):
    ans1 += abs(a[i]-num1)
ans2 = 0
for i in range(n):
    ans2 += abs(a[i]-num2)

ans = min(ans1,ans2)
print(ans)

### FIXED CODE ###

#c

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

for i in range(1,n+1):
    a[i-1] -= i
a.sort()
num0 = 0
num1 = a[int(n/2)-1]
num2 = a[int(n/2)]
num3 = int((num1 + num2)/2)
num4 = num3 - 1
num5 = num3 + 1
num6 = num1 + 1
num7 = num1 - 1
num8 = num2 + 1
num9 = num2 - 1

ans0 = 0
for i in range(n):
    ans0 += abs(a[i]-num0)
ans1 = 0
for i in range(n):
    ans1 += abs(a[i]-num1)
ans2 = 0
for i in range(n):
    ans2 += abs(a[i]-num2)
ans3 = 0
for i in range(n):
    ans3 += abs(a[i]-num3)
ans4 = 0
for i in range(n):
    ans4 += abs(a[i]-num4)
ans5 = 0
for i in range(n):
    ans5 += abs(a[i]-num5)
ans6 = 0
for i in range(n):
    ans6 += abs(a[i]-num6)
ans7 = 0
for i in range(n):
    ans7 += abs(a[i]-num7)
ans8 = 0
for i in range(n):
    ans8 += abs(a[i]-num8)
ans9 = 0
for i in range(n):
    ans9 += abs(a[i]-num9)

ans = min(ans0,ans1)
ans = min(ans,ans2)
ans = min(ans,ans3)
ans = min(ans,ans4)
ans = min(ans,ans5)
ans = min(ans,ans6)
ans = min(ans,ans7)
ans = min(ans,ans8)
ans = min(ans,ans9)
print(ans)