Harryxun/stf_run huggingface dataset:
a=int(input())
if a = 1:
  print(a)
elif int(a/2) = 0:
  print((a/2)/a)
else:
  print((int(a/2)+1)/a)


### FIXED CODE ###

import math
a=int(input())
b=math.floor(float(a/2))
print(float((a-b)/a))
import collections  

n = int(input())

s = []
for i in range(n):
    s.append(str(sorted(input())))

def f(a):
    if a == 0:
        return 1
    else:
        return a * f(a - 1)

cnt = 0
for (c, m) in collections.Counter(s).items():
    if 1 < m:
        combi = f(m - 1)
        cnt += combi
    
print(cnt)

### FIXED CODE ###

import collections  

n = int(input())

s = []
for i in range(n):
    s.append(str(sorted(input())))

cnt = 0
for (c, m) in collections.Counter(s).items():
    cnt += m * (m - 1) // 2
    
print(cnt)
n = int(input())
s = list(input())
count = 0
if n % 3 != 0 and n >= 3:
  for i in range (1,n):  
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
elif n % 3 == 0 and n >= 3:
  for i in range(1, n-1):
    if s[i-1] == 'A' and s[i] == 'B' and s [i+1] == 'C':
      count += 1
if n == 2:
  print(0)
else:
  print(count)

### FIXED CODE ###

k, x = map(int, input().split())
if k*500 >= x:
  print("Yes")
else:
  print("No")
x = 117
if '7' in x:
    print('yes')
else:
    print('no')

### FIXED CODE ###

x = input()
if '7' in x:
    print('Yes')
else:
    print('No')
A,B = map(int,input().split())
print(math.ceil((A-B)/(B-1))+1)

### FIXED CODE ###

import math
A,B = list(map(int,input().split()))
_ =input()
print(math.ceil((A-B)/(B-1))+1)
# -*- coding: utf-8 -*-

# input
N = int(input())
A = list()
for _ in range(N):
    A.append(int(input()))

# solve
ans = 0
l = [0] * max(A)
for i in range(N):
    l[A[i] - 1] += 1

for i in range(len(l)):
    if l[i] % 2 == 1:
        ans += 1

# output
print(ans)


### FIXED CODE ###

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

# input
N = int(input())
A = list()
for _ in range(N):
    A.append(int(input()))

# solve
ans = set()
for i in range(N):
    if A[i] in ans:
        ans.remove(A[i])
    else:
        ans.add(A[i])

# output
print(len(ans))
def main():
    n = int(input())
    ans = []
    for _ in range(n):
        a_num = int(input())
        t = []
        for _ in range(a_num):
            t.append(tuple(map(int, input().split())))
        t = tuple(t)
        ans.append(t)
   
    r = 0
    for bit in range(1 << n):
        honest = []
        for i1 in range(n):
            mask = 1<<i1
            if bit & mask:
                honest.append(i1)

        flag = 1
        if not honest:
            flag = 0
        for eh in honest:
            say = ans[eh]
            for esay in say:
                if esay[0] - 1 in honest:
                    if esay[1] == 0:
                        flag = 0
                else:
                    if esay[1]:
                        flag = 0
        if flag:
            r = max(r, len(honest))
    print(r)

if __name__ == '__main__':
    main(

### FIXED CODE ###


def main():
    n = int(input())
    ans = []
    for _ in range(n):
        a_num = int(input())
        t = []
        for _ in range(a_num):
            t.append(tuple(map(int, input().split())))
        t = tuple(t)
        ans.append(t)

    r = 0
    for bit in range(1 << n):
        honest = []
        for i1 in range(n):
            mask = 1<<i1
            if bit & mask:
                honest.append(i1)
        flag = 1       
        for eh in honest:
            say = ans[eh]
            for esay in say:
                if esay[0] - 1 in honest:
                    if esay[1] == 0:
                        flag = 0
                else:
                    if esay[1]:
                        flag = 0
        if flag:
            r = max(r, len(honest))
    print(r)

if __name__ == '__main__':
    main()
a=input()
print(a[0]+str(len(a-2))+a[-1])

### FIXED CODE ###

a=input()
print(a[0]+str(int(len(a)-2))+a[-1])
from collections import deque
import sys
input = sys.stdin.readline

h,w = map(int,input().split())
MAP = [list(input().rstrip()) for i in range(h)]  #rstripで最後の/nを省ける
sharp = 0
for i in range(h):
  sharp += MAP[i].count("#")
#print(sharp)

#必要なもの MAP(list), MOVE(list), STACK(deque)
MAP[0][0]=1
MOVE = [[1,0],[-1,0],[0,1],[0,-1]]
STACK = deque([(0,0)])
while STACK:
  y, x = STACK.popleft()
  for dy,dx in MOVE:
    ny = y + dy
    nx = x + dx
    if not(0 <= ny < h) or not(0 <= nx < w) or MAP[ny][nx]!='.':
      continue
    else:
      STACK.append((ny,nx))
      MAP[ny][nx] = MAP[y][x] + 1

ans = h*w -MAP[h-1][w-1]-sharp
#print(MAP)
print(ans)

### FIXED CODE ###

from collections import deque
import sys
input = sys.stdin.readline

h,w = map(int,input().split())
MAP = [list(input().rstrip()) for i in range(h)]  #rstripで最後の/nを省ける
sharp = 0
for i in range(h):
  sharp += MAP[i].count("#")
#print(sharp)

#必要なもの MAP(list), MOVE(list), STACK(deque)
MAP[0][0]=1
MOVE = [[1,0],[-1,0],[0,1],[0,-1]]
STACK = deque([(0,0)])
while STACK:
  y, x = STACK.popleft()
  for dy,dx in MOVE:
    ny = y + dy
    nx = x + dx
    if not(0 <= ny < h) or not(0 <= nx < w) or MAP[ny][nx]!='.':
      continue
    else:
      STACK.append((ny,nx))
      MAP[ny][nx] = MAP[y][x] + 1


if type(MAP[h-1][w-1]) == int:
  ans = h*w -MAP[h-1][w-1]-sharp
else:
  ans = -1
    
print(ans)
H, W = map(int,input().split())

S = [[]]

for h in range(H):
    S.append([])
    S[-1] = list(input())#.split()

del S[0]

for i in range(H):
    for j in range(W):
        if S[i][j] == '.': S[i][j] = 0
        if S[i][j] == '#': S[i][j] = -100

for i in range(H):
    for j in range(W):
        if S[i][j] < 0: 
            try:
                S[i-1][j] += 1
            except:
                ;
            try:
                S[i][j-1] += 1
            except:
                ;
            try:
                S[i+1][j] += 1
            except:
                ;
            try:
                S[i][j+1] += 1
            except:
                ;

for i in range(H):
    for j in range(W):
        if S[i][j] < 0: S[i][j] = '#'

for i in range(len(S)):
    for j in range(len(S[i])):
        print(S[i][j], end="")
    print()

### FIXED CODE ###

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

S = [[]]

for h in range(H):
    S.append([])
    S[-1] = list(input())

del S[0]

for i in range(H):
    for j in range(W):
        if S[i][j] == '.': S[i][j] = 0
        if S[i][j] == '#': S[i][j] = -100
            
for i in range(H):
    for j in range(W):
        if S[i][j] < 0:
            
            if i != 0:
                try: S[i-1][j] += 1
                except: x=1


                try: S[i-1][j+1] += 1
                except: x=1
                    
            if j != 0:
                try: S[i][j-1] += 1
                except: x=1

                try: S[i+1][j-1] += 1
                except: x=1
                
                if i != 0:
                    try: S[i-1][j-1] += 1
                    except: x=1

                
            try: S[i+1][j] += 1
            except: x=1
            
            try: S[i][j+1] += 1
            except: x=1
            
            try: S[i+1][j+1] += 1
            except: x=1
            
            
for i in range(H):
    for j in range(W):
        if S[i][j] < 0: S[i][j] = '#'

for i in range(len(S)):
    for j in range(len(S[i])):
        print(S[i][j], end="")
    print()
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = k()
ans = 1000000

for i in range(1,N**0.5+1):
    if N % i == 0:
        b = N // i
        ans = min(ans, b+i-2)

print(ans)


### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = k()
ans = N-1

for i in range(1,int(N**0.5)+1):
    if N % i == 0:
        b = N // i
        ans = min(ans, b+i-2)

print(ans)
from collections import Counter
n=int(input())
s=input()
half=n//2
if s[half]=="E":
    for i in range(n//2):
        if s[half+1]!=s[half]:
            break
        else:
            half+=1
else:
    for i in range(n//2):
        if s[half-1]!=s[half]:
            break
        else:
            half-=1
before=dict(Counter(s[0:half])).get("W",0)
after=dict(Counter(s[half+1:])).get("E",0)
print(before+after)

### FIXED CODE ###

n=int(input())
s=input()
left=[0]*(n+1)
right=[0]*(n+1)
for i in range(n):
    if s[i]=="W":
        left[i+1]=left[i]+1
    else:
        left[i+1]=left[i]

for i in range(n-1,0,-1):
    if s[i]=="E":
        right[i-1]=right[i]+1
    else:
        right[i-1]=right[i]
print(min([left[i]+right[i] for i in range(n)]))
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
#from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

n = INT()
a = LIST()
arr = []
plus = 0
for i in range(n):
    flag = True
    for j in range(1, 9):
        if a[i] < j * 400:
            if not j in arr:
                arr.append(j)
            flag = False
            break
    if flag:
        plus += 1
debug(len(set(arr)), plus, arr)
ansmx = min(len(set(arr)) + plus, 8)
ansmn = max(1, len(set(arr)))
print(ansmn, ansmx)

### FIXED CODE ###

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n = INT()
a = LIST()
a.sort()
arr = [0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200]
r = -1
for i in range(len(arr)):
    if a[0] < arr[i]:
        r = i
        break
ans = 1 if r != -1 else 0
ans2 = 0
for i in range(n):
    if a[i] >= arr[r]:
        r = -1
        for j in range(len(arr)):
            if a[i] < arr[j]:
                r = j
                break
        if r == -1:
            ans2 += 1
        else:
            ans += 1
print(ans if ans > 0 else 1, ans + ans2)
a,b,c=map(int,input().split())
if a%(b+c)<=b:
  print(((a//b*c)*b)+a%(b+c))
elif b==0:
  print(0)
else:
  print(((a//b*c)*b)+a%(b+c))

### FIXED CODE ###

a,b,c=map(int,input().split())
if a%(b+c)<=b:
  print((a//(b+c))*b+a%(b+c))
else:
  print((a//(b+c))*b+b)
K = int(input())
S = input()

MAX = 10 ** 6 + 100
MOD = 10 ** 9 + 7

# Factorial
fac = [0] * (MAX + 1)
fac[0] = 1
fac[1] = 1
for i in range(2, MAX + 1):
    fac[i] = fac[i - 1] * i % MOD
    
# Inverse factorial
finv = [0] * (MAX + 1)
finv[MAX] = pow(fac[MAX], MOD - 2, MOD)
for i in reversed(range(1, MAX + 1)):
    finv[i - 1] = finv[i] * i % MOD

def comb(n, k):
    if n < k or k < 0:
        return 0
    return fac[n] * finv[k] * finv[n - k]

N = len(S)
ans = 0
for i in range(K + 1):
    tmp = (pow(25, K - i, MOD) * pow(26, i, MOD)) % MOD
    ans += comb(N + K - i - 1, N - 1) * tmp
    ans %= MOD
print(ans)


### FIXED CODE ###

K = int(input())
S = input()

MAX = 2 * 10 ** 6 + 1
MOD = 10 ** 9 + 7

# Factorial
fac = [0] * (MAX + 1)
fac[0] = 1
fac[1] = 1
for i in range(2, MAX + 1):
    fac[i] = fac[i - 1] * i % MOD
    
# Inverse factorial
finv = [0] * (MAX + 1)
finv[MAX] = pow(fac[MAX], MOD - 2, MOD)
for i in reversed(range(1, MAX + 1)):
    finv[i - 1] = finv[i] * i % MOD

def comb(n, k):
    if n < k or k < 0:
        return 0
    return (fac[n] * finv[k] * finv[n - k]) % MOD

N = len(S)
ans = 0
for i in range(K + 1):
    tmp = (pow(25, K - i, MOD) * pow(26, i, MOD)) % MOD
    ans += comb(N + K - i - 1, N - 1) * tmp
    ans %= MOD
print(ans)
a,b=map(int,input().split())
print('Odd' if (a*b)%2 else 'Even'))

### FIXED CODE ###

a,b=map(int,input().split())
print('Odd' if (a*b)%2 else 'Even')
import sys
import collections
from collections import Counter
# from collections import deque
# from collections import defaultdict
import itertools
# from itertools import accumulate
# from itertools import permutations
# from itertools import combinations
# from itertools import takewhile
from itertools import compress
import functools
# from functools import reduce
import math
# from math import gcd
# from math import inf
# from math import ceil
# from math import floor
# from math import log10
# from math import log2
# from math import log
from math import factorial

MOD = (10 ** 9) + 7
# import re

# input = sys.stdin.readline
sys.setrecursionlimit(10000)

S = input()
N = len(S)


def funcA(idx, q):
    if idx >= N:
        return 0
    ret = 0
    if S[idx] == "A" or S[idx] == "?":
        ret += funcB(idx + 1, q)
    q += 1 if S[idx] == "?" else 0
    ret += funcA(idx + 1, q)
    return ret


def funcB(idx, q):
    if idx >= N:
        return 0
    ret = 0
    if S[idx] == "B" or S[idx] == "?":
        ret += funcC(idx + 1, q)
    q += 1 if S[idx] == "?" else 0
    ret += funcB(idx + 1, q)
    return ret


def funcC(idx, q):
    if idx >= N:
        return 0
    ret = 0
    if S[idx] == "C" or S[idx] == "?":
        addQ = S[idx + 1:].count("?")
        ret += 3 ** (q + addQ)

    q += 1 if S[idx] == "?" else 0
    ret += funcC(idx + 1, q)
    return ret


ans = funcA(0, 0)

print(ans % MOD)


### FIXED CODE ###

import gc

MOD = (10 ** 9) + 7

S = input()
N = len(S)

dp = [[0] * (N + 1) for _ in range(4)]

dp[0][0] = 1
dp[1][0] = 0
dp[2][0] = 0
dp[3][0] = 0

for i in range(1, N + 1):
    for j in range(4):
        s = S[i - 1]
        m = 3 if s == "?" else 1
        dp[j][i] += m * dp[j][i - 1]
        if j == 1:
            if s == "A" or s == "?":
                dp[j][i] += dp[j - 1][i - 1]
        elif j == 2:
            if s == "B" or s == "?":
                dp[j][i] += dp[j - 1][i - 1]
        elif j == 3:
            if s == "C" or s == "?":
                dp[j][i] += dp[j - 1][i - 1]
        dp[j][i] = dp[j][i] % MOD

print(dp[3][N] % MOD)
N=int(input())
for i in range(N):
  l=list(input().split)
print(l)

### FIXED CODE ###

N=int(input())
l=[]
for i in range(N):
  d,t=input().split()
  l.append([d,t])
m=0
for i in l:
  if i[1] == "JPY":
    m=m+int(i[0])
  else:
    m=m+380000.0*float(i[0])
print(m)
#codigng: utf-8
from sys import stdin

bin  = list(stdin.readline().rstrip())
one = [x for x in bin if x == '1']

print(len(one)


### FIXED CODE ###

#codigng: utf-8
from sys import stdin

bin  = list(stdin.readline().rstrip())
one = [x for x in bin if x == '1']

print(len(one))
n = int(input())
s = list(map(int, input().split()))
t = []
cnt = 2
for a in s:
  try:
    t[a-1].append(cnt)
  except IndexError:
    for _ in range(a-len(t)):
      t.append([])
      t[-1].append(cnt)
for i in range(n-1):
  print(len(t[i]))
print(0)

### FIXED CODE ###

n = int(input())
s = list(map(int, input().split()))
t = [0 for _ in range(n)]
for i in range(n-1):
  t[s[i]-1] += 1
for i in range(n):
  print(t[i])
x,y = map(int, input().split())
d = {1:300000, 2:200000, 3:100000}
if x == y == 1:
  print(1000000)
  exit()
a = 0, b = 0
if 1 <= x <= 3:
  a = d[x]
if 1 <= y <= 3:
  b = d[x]

print(a+b)

### FIXED CODE ###

x,y = map(int, input().split())
d = {1:300000, 2:200000, 3:100000}
if x == y == 1:
  print(1000000)
  exit()
a = 0
b = 0
if 1 <= x <= 3:
  a = d[x]
if 1 <= y <= 3:
  b = d[y]

print(a+b)
from numpy import gcd

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x.sort()
diff_x = [x[i+1] - x[i] for i in range(n-1)]
ans = 1
for x_i in x:
    ans = int(gcd(ans, x_i))

print(ans)


### FIXED CODE ###

def gcd(a, b):
    m, n = max(a,b), min(a,b)
    while n != 0:
        m, n = n, m%n
    return m

n, x0 = map(int, input().split())
x = list(map(int, input().split())) + [x0]

x = list(set(x))
x.sort()
if len(x) >= 3:
    diff_x = [x[i+1] - x[i] for i in range(n)]
    ans = diff_x[0]
    for dx in diff_x[1:]:
        ans = int(gcd(ans, dx))
elif len(x) == 2:
    ans = x[1] - x[0]


print(ans)
n = list(map(int, input().split()))
distance = n[1]
points = [list(map(int, input().split())) for i in range(n[0])]
ans = 0
for i in points:
    x = i[0]
    y = i[1]
    d = (x**2 + y**2)**-2
    if d <= distance:
        ans += 1
print(ans)

### FIXED CODE ###

import math
n = list(map(int, input().split()))
distance = n[1]
points = [list(map(int, input().split())) for i in range(n[0])]
ans = 0
for i in points:
    x = i[0]
    y = i[1]
    d = math.sqrt(x**2 + y**2)
    if d <= distance:
        ans += 1
print(ans)
N,Q = map(int,input().split())
aLst = [[int(x) for x in input().split()] for _ in range(N-1)]
pLst = [[int(x) for x in input().split()] for _ in range(Q)]

tmpLst = [[] for _ in range(N+1)]
for i, j in aLst:
    tmpLst[i].append(j)
    tmpLst[j].append(i)

ansLst = [0] * (N + 1)
for i,j in pLst:
    ansLst[i] += j

def dfs(v, p):
    for i in tmpLst[v]:
        if i == p:
            continue
        ansLst[i] += ansLst[v]
        dfs(i, v)


dfs(1, 0)

ans = ' '.join(map(str, ansLst[1:]))
print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

# 遅延評価で加えてあげるだけ

N,Q = map(int,input().split())
AB = [[int(x) for x in input().split()] for _ in range(N-1)]
PX = [[int(x) for x in input().split()] for _ in range(Q)]

graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)

value = [0] * (N+1)
for p,x in PX:
    value[p] += x
    
q = [(1,0)]
while q:
    x,parent = q.pop()
    value[x] += value[parent]
    for y in graph[x]:
        if y == parent:
            continue
        q.append((y,x))

answer = ' '.join(map(str,value[1:]))
print(answer)
import itertools
n = int(input())
P = list(map(int, input().replace(' ', '')))
Q = list(map(int, input().replace(' ', '')))
N = [i + 1 for i in range(n)]
per = list(itertools.permutations(N))
lis = []
for oc in per:
    lis.append(int(''.join(map(str, list(oc)))))
a = lis.index(P)
b = lis.index(Q)
print(abs(a - b))

### FIXED CODE ###

import itertools
n = int(input())
P = int(input().replace(' ', ''))
Q = int(input().replace(' ', ''))
N = [i + 1 for i in range(n)]
per = list(itertools.permutations(N))
lis = []
for oc in per:
    lis.append(int(''.join(map(str, list(oc)))))
a = lis.index(P)
b = lis.index(Q)
print(abs(a - b))
n = int(input())
a = list(map(int, input().split()))
a.sort()
if a[0] == 0:
    print(0)
else:
    ans = -1
    for i in range(n):
        if(ans == -1):
            ans = a[i]
        else:
            ans *= a[i]
            if(ans > 1e18):
                ans = -1
                break
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
a.sort()
if a[0] == 0:
    print(0)
else:
    ans = -1
    for i in range(n):
        if(ans == -1):
            ans = a[i]
        else:
            ans *= a[i]
            if(ans > 1e18):
                ans = -1
                break
    print(ans)
N,A=map(int,input().split())
print(N*N-A)

### FIXED CODE ###

N=int(input())
A=int(input())
print(N*N-A)
n,k=map(int,input().split(' '))
a=list(1 for i in range(n+1))
for z in range(k):
  x=int(input())
  temp=map(int,input.split(' '))
  for i in temp:
    a[i]+=1
    c=0
for i in range(1,n+1):
  if(a[i]==0):
    c++
print(c)

### FIXED CODE ###

n,k=map(int,input().split(' '))
a=[0 for i in range(n+1)]
for z in range(k):
  x=int(input())
  temp=map(int,input().split(' '))
  for i in temp:
    a[i]+=1
c=0
for i in range(1,n+1):
  if(a[i]==0):
    c+=1
print(c)
N, K = map(int, input().split())
H = list(map(int, input().split()))

H.sort(reverse = True)
sum = 0

for i in range(K):
  H[i] = 0
  
sum = sum(H)

print(sum)


### FIXED CODE ###

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

a = 0

if K > N:
  a = K - N

for _ in range(a):
  H.append(0)

H.sort(reverse = True)
sum = 0

for i in range(K):
  H[i] = 0
  
for i in range(N):
  sum += H[i]
  
print(sum)
N=input()
sum=0
for i in range(1,N+1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i
print(sum)


### FIXED CODE ###

N=input()
sum=0
for i in range(1,int(N)+1):
    if i % 3 != 0 and i % 5 != 0:
        #print(i)
        sum += i
print(sum)
// D - Water Bottle
#include <bits/stdc++.h>
using namespace std;
using dbl = double;

int main(){
	dbl a,b,x; cin>>a>>b>>x;
	dbl s = x/a;
	dbl h = b, w = a;
	if(s < a*b/2) w = s/b*2;
	else h = (b-s/a)*2;
	printf("%.10f\n", atan2(h, w)*180/M_PI);
}

### FIXED CODE ###

# D - Water Bottle
from math import atan, degrees
a,b,x = map(float, input().split())
s = x/a
print( degrees( atan( b/(s/b*2) if s<a*b/2 else (b-s/a)*2/a ) ) )
temp = []
a,b,k = map(int,input().split())
for i in range (1, min(a,b)):
  if a%i==0 and b%i==0:
	temp.append(i)
print(temp[k])

### FIXED CODE ###

temp = []
a,b,k = map(int,input().split())
for i in range (1, min(a,b)+1):
  if a%i==0 and b%i==0:
    temp.append(i)
print(temp[-k])
N, M = map(int, input().split())
A_B = []
for i in range(N):
    A_B.append([int(x) for x in input().split()])

money = 0
count = 0
while count < M:
    min_ = 1000000
    index = None
    for i in range(len(A_B)):
        if A_B[i][0] < min_:
            min_ = A_B[i][0]
            index = i
    if count+A_B[index][1] <= M:
        count += A_B[index][1]
        money += A_B[index][1] * A_B[index][0]
    else:
        money += A_B[index][0] * (M-count)
        count = M
    A_B.pop(index)
print(money)

### FIXED CODE ###

N, M = map(int, input().split())
A_B = []
for i in range(N):
    A_B.append([int(x) for x in input().split()])

money = 0
count = 0
A_B = sorted(A_B)
while count < M:
    if count+A_B[0][1] <= M:
        count += A_B[0][1]
        money += A_B[0][0] * A_B[0][1]
    else:
        money += A_B[0][0] * (M-count)
        count = M
    A_B.pop(0)
print(money)
list1 = input().split()
n = int(list1[0])
t = int(list1[1])
a = input().split()

list = []
l = 0
i = 0
while l < n:
   i = l + 1
   if i == n:
       list.append(int(a[i-1])-int(a[l]))     
       break
      else: 
       while i < n:
        if a[i-1]<a[i]:
           i += 1
        else:
           list.append(int(a[i-1])-int(a[l]))
           break
   l += 1

print(list.count(max(list)))

### FIXED CODE ###

list = input().split()
a = int(list[0])
b = int(list[1])
c = int(list[2])

if a+b == c:
   print("Yes")
elif a+c == b:
   print("Yes")
elif b+c == a:
   print("Yes")
else:
   print("No")
n = int(input())
a = list(map(int,input().split()))
res = 0

for i in range(n):
  sel = a[i]
  if a[sel] = i:
    res += 1
else:
  print(res/2)

### FIXED CODE ###

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

for i in range(n):
  sel = a[i] -1
  if a[sel] == i+1:
    res += 1
else:
  print(int(res/2))