Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-

N = input()

for i in range(N):
    if i*i > N:
        print (i-1)*(i-1)
        break
else:
    pass

### FIXED CODE ###

# -*- coding: utf-8 -*-
import numpy as np
import math

N = input()

sq = np.sqrt(N)
s = int(math.floor(sq))
print s*s
,k=map(int,input().split())
s=input()

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

happy=0
for i in range(n-1):
  if s[i]==s[i+1]:
    happy+=1

l_cnt=[]
for i in range(n):
  if s[i]=='R':
    if i==0:
      if s[i+1]=='L':
        l_cnt.append(1)
    if i==n-1:
      if s[i-1]=='L':
        l_cnt.append(1)
    else:
      t_l_cnt=s[i-1:i+2].count('L')
      l_cnt.append(t_l_cnt)

r_cnt=[]
for i in range(n):
  if s[i]=='L':
    if i==0:
      if s[i+1]=='R':
        r_cnt.append(1)
    if i==n-1:
      if s[i-1]=='R':
        r_cnt.append(1)
    else:
      t_r_cnt=s[i-1:i+2].count('R')
      r_cnt.append(t_r_cnt)

ans=l_cnt+r_cnt
ans.sort(reverse=True)
ans=sum(ans[:k])

print(happy+ans)

### FIXED CODE ###

n,k=map(int,input().split())
s=input()

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

happy=0
cnt=0
for i in range(n-1):
  if s[i]==s[i+1]:
    happy+=1
  else:
    cnt+=1

print(min(n-1,happy+min(cnt,k)*2))
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = 0
arr = []
arr2 = []
cnt = 0
for i in range(M):
    a, b = list(map(int, input().split()))
    if a not in arr2:
        arr2.append(a)
    if b not in arr2:
        arr2.append(b)
    if H[a-1] < H[b-1]:
        if H[a] not in arr:
            arr.append(H[a])
            cnt += 1

not_found = len(H)-len(arr2)
print(N-cnt-not_found)


### FIXED CODE ###

from collections import defaultdict
N, M = list(map(int, input().split()))
H = list(map(int, input().split()))
ans = N
tog = defaultdict(list)
arr = set()
cnt = 0

for i in range(M):
    a, b = list(map(int, input().split()))
    tog[a].append(H[b-1])
    tog[b].append(H[a-1])
    '''
    if str(a) not in arr:
        ans -= 1
        arr.add(str(H[a-1]))
    if str(b) not in arr:
        ans -= 1
        arr.add(str(H[b-1]))
    '''
#print(tog)

for ele in tog:
    #print(tog[ele])
    #print(max(tog[ele]))
    if H[ele-1] > max(tog[ele]):
        #print('ok')
        cnt += 1

#print(len(tog))
t = N - len(tog)
#print(t)
#print(len(arr))
#print(len(tog)+N-cnt)
print(cnt+t)
n, m = map(int, input().split())
adj = [[] for _ in range(m)]
for i in range(m):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    adj[a].append(b)
    adj[b].append(a)
# print(adj)
from collections import deque
q = deque([0])
dist = [-1]*n
ans = [0]*n

while q:
    now = q.popleft()
    for to in adj[now]:
        if dist[to] != -1: continue
        dist[to] = dist[now] + 1
        q.append(to)
        ans[to] = now 
    # print(adj[now], dist, ans, q)
    
print("Yes")
for i in range(1,n):
    print(ans[i]+1)


### FIXED CODE ###

n, m = map(int ,input().split())
 
adj = [[] for _ in range(n)]
 
for i in range(m):
    a, b = map(int, input().split())
    a-=1
    b-=1
    adj[a].append(b)
    adj[b].append(a)
 
from collections import deque
q = deque()
 
dist = [-1] * n
ans = [0] * n
 
q.append(0)
while len(q) != 0:
    now = q.popleft()
    for to in adj[now]:
        if dist[to] != -1:continue
        dist[to] = dist[now] + 1
        q.append(to)
        ans[to] = now
 
print("Yes")
for i in range(1, n):
    print(ans[i] + 1)
r,g,b=map(int,input().split())
if (10*g + b )%4 == 0 :print('YES')
  else:print('NO')

### FIXED CODE ###

r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')
n = int(input())
A = list(map(int, input().split()))

i = 1
ans = 1
plus = False
minus = False
while True:
    while A[i] - A[i-1] == 0:
        i += 1
    if A[i] - A[i - 1] > 0:
        plus = True
    else:
        minus = True
    if plus:
        while A[i] - A[i - 1] >= 0:
            i += 1
            if i == n:
                break
    else:
        while A[i] - A[i -1] <= 0:
            i += 1
            if i == n:
                break
    if i == n:
        break
    if plus:
        minus = True
        plus = False
    else:
        plus = True
        minus = False
    ans += 1
    if i != n -1:
        i += 1

print(ans)

### FIXED CODE ###

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

i = 1
ans = 1
flg = 0
for i, j in zip(A[:-1],A[1:]):
    if i < j:
        if flg == 0:
            flg = 1
        elif flg == 2:
            ans += 1
            flg = 0
    if i > j:
        if flg == 0:
            flg = 2
        elif flg == 1:
            ans += 1
            flg = 0
print(ans)
c = a * b
if c % 2 == 0:
  print("even")
else :
  print("odd")

### FIXED CODE ###

a,b = map(int, input() .split())
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")
n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
print(lcm(lis))

### FIXED CODE ###

import numpy as np
n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))
print(np.lcm.reduce(lis))
N = int(input())
d = [0 for i in range(19)]
if N % 2 == 1:
    ans = 0
f = 0
else:
    for i in range(18):
        x = 18 - i
        y = 10**y
        a = N // y
        d[x] = a - f
        f = a
    ans = 0
    for i in range(1,19):
        ans += (d[i]*i)
print(ans)
        

### FIXED CODE ###

N = int(input())
d = [0 for i in range(31)]
b = 0
if N % 2 == 0:
    for i in range(30):
        x = 30 - i
        y = 5**x
        a = (N//y)//2
        d[x] = a - b
        b = a
    ans = 0
    for i in range(1,31):
        ans += (d[i]*i)
else:
    ans = 0
print(ans)
N = input()
p = []
for i in range(N):
    p.append(input())

print(sum(p)-max(p)//2)



### FIXED CODE ###

a = input()
if a == "25":
    print("Christmas")
elif a == "24":
    print("Christmas Eve")
elif a == "23":
    print("Christmas Eve Eve")
else: print("Christmas Eve Eve Eve")
def root(x):
  if par[x] == x:
    return x
  par[x] = root(par[x])
  return par[x]

def union(x, y):
  rx = root(x)
  ry = root(y)
  if rx != ry:
    par[rx] = ry
    
def same(x,y):
  rx = root(x)
  ry = root(y)
  return rx == ry
    
n, m=map(int, input().split(" "))
par = list(range(n + 1))
for i in range(m):
  a, b = map(int, input().split(" "))
  union(a, b)
#print(par)
maxi = 0
count = 1
#print(par)
countpar = [0 for i in range(n + 1)]
for i in range(1, n + 1):
  countpar[root(par[i])] += 1
print(max(countpar))


### FIXED CODE ###

import sys
import resource

def root(x):
  if par[x] == x:
    return x
  par[x] = root(par[x])
  return par[x]

def union(x, y):
  rx = root(x)
  ry = root(y)
  if rx != ry:
    par[rx] = ry
  return 0

sys.setrecursionlimit(10 ** 6)
n, m=map(int, input().split(" "))
par = list(range(n + 1))
for i in range(m):
  a, b = map(int, input().split(" "))
  union(a, b)
#print(par)
maxi = 0
count = 1
#print(par)
countpar = [0 for i in range(n + 1)]
#print(len(countpar), len(par))
for i in range(1, n + 1):
  countpar[root(par[i])] += 1
print(max(countpar))
#print(countpar, par)
N = int(input())
buttons = [int(input()) for i in range(N)]

pushed = list()
button = 1
count = 0
while(True):
    button = buttons[button - 1]
    count +=1
    if (button == 2):
        print(count)
        break
    elif(button in pushed):
        print(-1)
        break
    else:
        pushued.append(button)

### FIXED CODE ###

N = int(input())
buttons = [int(input()) for i in range(N)]

button = 1
count = 0
while(True):
    button = buttons[button - 1]
    count += 1
    if (button == 2):
        print(count)
        break
    elif(count > N):
        print(-1)
        break
X,Y=input().split();print("=><"[X>Y | -(X<Y)])

### FIXED CODE ###

a,b=input().split();print([[">","="][ord(a)==ord(b)],"<"][ord(a)<ord(b)])
from collections import defaultdict
n, m, k = list(map(int, input().split()))
ns = defaultdict(set)
bs = defaultdict(set)
for i in range(m):
    a,b = list(map(int, input().split()))
    ns[a-1].add(b-1)
    ns[b-1].add(a-1)
for i in range(k):
    c,d = list(map(int, input().split()))
    bs[c-1].add(d-1)
    bs[d-1].add(c-1)
    
s = [0]
start = 0
parent = [None] * n
starts = defaultdict(int)
starts[0] = 0
done = [0] * n
doneCount = 0
while doneCount<n:
    u = s.pop()
    done[u] = 1
    doneCount += 1
    parent[u] = start
    starts[start] += 1
    for v in ns[u]:
        if not done[v]:
            s.append(v)
    if not s:
        start = 0
        while done[start]:
            start += 1
        parent[start] = start
        s.append(start)
ans = [None] * n
for u in range(n):
    val = starts[parent[u]] - 1 - len(ns[u])
    for v in bs[u]:
        if parent[v]==parent[u]:
            val -= 1
    ans[u] = val
print(" ".join(map(str, ans)))

### FIXED CODE ###



from collections import defaultdict
n, m, k = list(map(int, input().split()))
ns = defaultdict(set)
bs = defaultdict(set)
for i in range(m):
    a,b = list(map(int, input().split()))
    ns[a-1].add(b-1)
    ns[b-1].add(a-1)
for i in range(k):
    c,d = list(map(int, input().split()))
    bs[c-1].add(d-1)
    bs[d-1].add(c-1)
    
s = [0]
start = 0
parent = [None] * n
starts = defaultdict(int)
starts[0] = 0
notdone = set(list(range(n)))
notdone.remove(start)
while notdone or s:
    u = s.pop()
    parent[u] = start
    starts[start] += 1
    for v in ns[u]:
        if v in notdone:
            s.append(v)
            notdone.remove(v)
    if not s and notdone:
        start = notdone.pop()
        parent[start] = start
        s.append(start)
ans = [None] * n
for u in range(n):
    val = starts[parent[u]] - 1 - len(ns[u])
    for v in bs[u]:
        if parent[v]==parent[u]:
            val -= 1
    ans[u] = val
print(" ".join(map(str, ans)))
N, A, B = map(int, input().split())
print(min(N*a, B))

### FIXED CODE ###

N, A, B = map(int, input().split())
print(min(N*A, B))
a,b=input().split()
n=int(a+b)
print("Yes" if math.sqrt(n).is_integer() else "No")

### FIXED CODE ###

import math
a,b=input().split()
n=int(a+b)
print("Yes" if math.sqrt(n).is_integer() else "No")
import itertools
import numpy as np

H, W, K = map(int, input().split())

temp = []
for _ in range(H):
  C = list(input())
  A = [c.replace('.', '0') for c in C]
  A = [a.replace('#', '1') for a in A]
  A = list(map(lambda x: int(x), A))
  temp.append(A)
  
C = np.array(temp)

count = 0
l = [0, 1]
wide = itertools.product(1, repeat=W)
for w in wide:
  height = itertools.product(1, repeat=H)
  for h in height:
    copy_C = C.copy()
    for num, i in enumerate(w):
      if i == 1:
        copy_C[:, num - 1] = 0
      for num2, j in enumerate(h):
        if j == 1:
          copy_C[num2 - 1, :] = 0
      if copy_C.sum() == K:
        count = count + 1
print(count)

### FIXED CODE ###

import itertools
import numpy as np

H, W, K = map(int, input().split())

temp = []
for _ in range(H):
    C = list(input())
    A = [c.replace('.', '0') for c in C]
    A = [a.replace('#', '1') for a in A]
    A = list(map(lambda x: int(x), A))
    temp.append(A)

C = np.array(temp)

count = 0
l = [0, 1]
wide = itertools.product(l, repeat=W)
for w in wide:
    hight = itertools.product(l, repeat=H)
    for h in hight:
        copy_C = C.copy()
        for num, i in enumerate(w):
            if i == 1:
                copy_C[:, num-1] = 0
            for num2, j in enumerate(h):
                if j == 1:
                    copy_C[num2-1, :] = 0
        if copy_C.sum() == K:
            count += 1

print(count)
n = int(input())
l = list(map(int, input().split()))
cnt = 0
for i in range(n):
    if i == l[l[i] - 1] - 1:
        cnt+=1
cnt //= 2
print(cnt)


### FIXED CODE ###

s = input()
s = s[:4] + ' ' + s[4:]
print(s)
n,m=map(int,input().split())
fib=[0]*(n+1)
fib[0]=0
fib[1]=1
for i in range(n-1):
  fib[i+2]=fib[i]+fib[i+1]
ans=1
k=0
for i in range(m):
  a=int(input())
  ans*=fib[a-k]
  k=a+1
ans*=fib[n-k+1]
print(ans%1000000007)

### FIXED CODE ###

n,m=map(int,input().split())
a=set([int(input()) for i in range(m)])
dp=[0]*(n+1)
dp[0]=1
for i in range(1,n+1):
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
    if i in a:
      dp[i]=0
print(dp[n])
#Palace
N,T,A,*H = map(int,open(0).read().split())
A = [A]*N
for i in range (N):
    H[i] = abs((T-H[i]*0.006)-A[i])
print(H.index(min(H)+1)+1)

### FIXED CODE ###

N = int(input())
T, A = map(int,input().split())
H = list(map(int,input().split()))
 
res = [abs(T-h*0.006-A) for h in H]
print(res.index(min(res))+1)
N = int(input())
a = [int(i) for i in input().split()]
set_a = set(a)
ans = 0

for ai in set_a:
  	ai_count = a.count(ai)
    ans += ai_count - ai if ai_count >= ai else ai_count

print(ans)

### FIXED CODE ###

from collections import Counter

N = int(input())
a = [int(i) for i in input().split()]

cnt = Counter(a)
ans = 0

for ai, num in cnt.items():
  if num >= ai:
  	ans += num - ai  
  else:
    ans += num

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


def f(n):
    if n >= 0:
        return n//x+1
    else:
        0

print(f(b)-f(a-1))

### FIXED CODE ###

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


def f(n):
    if n >= 0:
        return n//x+1
    else:
        return 0

print(f(b)-f(a-1))
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

halfVolume=a*a*b/2
print(halfVolume)

if x>=halfVolume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=x/(a*b)
    print(const.convToDEG*math.acos(2*h/b))



### FIXED CODE ###

import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    r=2*x/(a*b*b)

    print(const.convToDEG*(const.PI/2-math.atan(r)))
a, b, c, x, y = list(map(int, input().split()))

if a<c and b<c:
    ans = a*x + b*y
else:
    min_money=2*5000*10**5
    for nc in range(0,2*10**5+1,2):
        if nc > 2*x and nc > 2*y:
            break
        if nc > 2*x:
            money = (y-nc//2)*b + nc*c
        elif nc > 2*y:
            money = (x-nc//2)*a + nc*c
        else:
            money = (x-nc//2)*a + (y-nc//2)*b + nc*c
        if min_money > money:
            min_money = money
            nc0=nc

print(min_money)

### FIXED CODE ###

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

min_money=2*5000*10**5
for nc in range(0,2*10**5+1,2):
    if nc > 2*x and nc > 2*y:
        break
    if nc > 2*x:
        money = (y-nc//2)*b + nc*c
    elif nc > 2*y:
        money = (x-nc//2)*a + nc*c
    else:
        money = (x-nc//2)*a + (y-nc//2)*b + nc*c
    if min_money > money:
        min_money = money
            
print(min_money)
s, w = map(int, input().split())
if (s >= w):
    print(safe)
else:
    print(unsafe)

### FIXED CODE ###

S, W = map(int, input().split())
if S <= W:
    print("unsafe")
else:
    print("safe")
input_lines = input().split()
N = int(input_lines[0])
M = int(input_lines[1])
S = input()
T = input()

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

def lcm(a, b):
  return a*b/gcd(a, b)

L = int(lcm(N,M))
x = 1
count = 0
if N >= M:
    big = N
    small = M
else:
    big = M
    small = N
    
while True:
    k = L*x
    flag = 1
    for j in range(small):
        left = 0
        right = big - 1
        while left <= right:
            mid = (left+right)/2
            if((mid-1)*k/big+1 == (j-1)*k/small+1):
                if(S[mid-1] != T[j-1]):
                    flag = 0
                    count += 1
                    break
                else:
                    break
            elif((mid-1)*k/big+1 > (j-1)*k/small+1):
                right = mid - 1
            else:
                left = mid + 1
    if(flag == 1):
        print(k)
        break
    if(count == 2):
        print(-1)
        break
    x += 1


### FIXED CODE ###

input_lines = input().split()
N = int(input_lines[0])
M = int(input_lines[1])
S = input()
T = input()

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

def lcm(a, b):
  return a*b/gcd(a, b)

L = int(lcm(N,M))
x = 1
count = 0
while True:
    k = L*x
    flag = 1
    starti = 0
    startj = 0
    for i in range(starti, N):
        for j in range(startj, M):
            hoge = i*k/N+1
            fuga = j*k/M+1
            if(hoge < fuga):
                startj = j - 1
                break
            elif(hoge == fuga):
                if(S[i] != T[j]):
                    flag = 0
                    count += 1
                    break
        if(flag == 0):
            break
    if(flag == 1):
        print(k)
        break
    if(count == 2):
        print(-1)
        break
    x += 1
s = input()
 
for i in range(len(s)):
    print(len(s)-1)
    if s[i] == '?':
        if i == 0 and s[1] == 'D':
            s = s.replace('?','P',1)
        elif i == 0 and s[1] == 'P':
            s = s.replace('?','D',1)
        elif i == 0 and s[1] == '?':
            s = s.replace('?','D',1)
        elif s[i-1] =='P':
            s = s.replace('?','D',1)
        else:
            s = s.replace('?','P',1)


print(s)

### FIXED CODE ###

s = input()
 
for i in range(len(s)):
    if s[i] == '?':
        if i == 0 and len(s) == 1:
            s = s.replace('?','D',1)
        elif i == 0 and s[1] == 'D':
            s = s.replace('?','P',1)
        elif i == 0 and s[1] == 'P':
            s = s.replace('?','D',1)
        elif i == 0 and s[1] == '?':
            s = s.replace('?','D',1)
        elif s[i-1] =='P':
            s = s.replace('?','D',1)
        elif s[i-1] =='D' and (i ==len(s)-1):
            s = s.replace('?','D',1)
        elif s[i-1] =='D' and (i <len(s)-1 and(s[i+1] == 'P' or s[i+1] == '?')):
            s = s.replace('?','D',1)
        else:
            s = s.replace('?','P',1)


print(s)
K = int(input())

nlist = [1,2,3,4,5,6,7,8,9]
sample = 0
count = 0

def BFS(count,nlist,sample):
    if count == K:
        print(sample)
        return
    else:
        sample = nlist.pop(0)
        
        if sample%10 != 0:
            nlist.append(sample*10 - 1 + sample%10)
            
        nlist.append(sample*10 + + sample%10)
        
        if sample%10 != 9:
            nlist.append(sample*10 + 1 + sample%10)
            
        count+=1

        BFS(count,nlist,sample)
        
BFS(count,nlist,sample)

### FIXED CODE ###

K = int(input())

from collections import deque

nlist = deque([1,2,3,4,5,6,7,8,9])

for i in range(K):
    sample = nlist.popleft()
        
    if sample%10 != 0:
        nlist.append(sample*10 - 1 + sample%10)
            
    nlist.append(sample*10 + sample%10)
        
    if sample%10 != 9:
        nlist.append(sample*10 + 1 + sample%10)
    
print(sample)
x = list(map(int,input().split()))
    print(x.index(0)+1)

### FIXED CODE ###

x = list(map(int, input().split()))
print((x.index(0))+1)
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()
    num_list = i_list()

    sum_d = num_list[0] ^ num_list[1] ^ num_list[2] ^ num_list[3]

    ans_list = []
    for num in num_list:
        ans_list.append(sum_d ^ num)

    print(*ans_list)

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    n = i_input()
    num_list = i_list()

    sum_d = 0
    for num in num_list:
        sum_d ^= num

    ans_list = []
    for num in num_list:
        ans_list.append(sum_d ^ num)

    print(*ans_list)

if __name__ == '__main__':
    main()
n=input
ans=700
for i in range (3):
	if n[0]=='o':
  		ans=ans+100
print(ans)
  	

### FIXED CODE ###

n=input()
ans=700
for i in range (3):
	if n[i]=='o':
  		ans=ans+100
print(ans)
s=input()
a=int(s)
d=a/2
e=(a+1)/2

if a%=2:
    print(d)
else :
    print(e)

### FIXED CODE ###

a=int(input())
print((a+1)//2)
n,k = map(int,input().split())
h = list(map(input().split()))
h.sort()
ans = int(0)
for i in range(len(h) - k):
    ans += int(h[i])
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
h = list(map(int, input().split()))
h = sorted(h, reverse=True)
ans = 0
for i in range(k, n):
  ans+=h[i]
  
print(ans)
n, m = map(int, input().split())
h = list(map(int, input().split()))
ab = [[] for _ in range(n)]
check = [False for _ in range(n)]
for i in range(m):
  a, b = map(int, input().split())
  ab[a-1].append(b)
  ab[b-1].append(a)

for j in range(n):
  for k in ab[j]:
    if k < h[j]:
      check[j] = True
    elif k > h[j]:
      check[j] = False
	else:
      check[j] = False

print(check.count(True))

### FIXED CODE ###

n,m=map(int,input().split())
h=[0]+list(map(int, input().split()))
roads=[[] for _ in range(n+1)]
cnt=0
for i in range(m):
    a,b=map(int,input().split())
    roads[a].append(b)
    roads[b].append(a)

for i in range(1,n+1):
    for j in roads[i]:
        if h[i]<=h[j]:
            break
    else:
         cnt+=1
    
print(cnt)