CodeEff/ECCO huggingface dataset:
# Original solution
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n,m,v,p = inpl()
a = inpl()
c = Counter(a)
a.sort()
b_num = a[n-p]
d_cnt = 0
b_cnt = 0
u_cnt = 0
for i in a:
    if i < b_num: d_cnt += 1
    elif i == b_num: b_cnt += 1
    else: u_cnt += 1

def f(x,i):
    if x >= b_num:
        return True
    if x + m < b_num:
        return False
    if i + 1 + u_cnt >= v:
        return True
    cnt = 0
    for item in a:
        if item > b_num or item <= x:
            cnt += m
        else:
            cnt += x + m - item
    # print(cnt)
    if cnt >= m*v:
        return True
    else:
        return False
# print(f(a[2],2))
ok = n
ng = -1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if f(a[mid],mid):
        ok = mid
    else:
        ng = mid
print((n-ok))


# Optimized solution
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n,m,v,p = inpl()
a = inpl()
c = Counter(a)
a.sort()
b_num = a[n-p]
d_cnt = 0
b_cnt = 0
u_cnt = 0
for i in a:
    if i < b_num: d_cnt += 1
    elif i == b_num: b_cnt += 1
    else: u_cnt += 1

def f(x,i):
    if x >= b_num:
        return True
    if x + m < b_num:
        return False
    if i + 1 + u_cnt >= v:
        return True
    cnt = 0
    for item in a:
        if item > b_num or item <= x:
            cnt += m
        else:
            cnt += x + m - item
    # print(cnt)
    if cnt >= m*v:
        return True
    else:
        return False
# print(f(a[2],2))
ok = n-1
ng = -1
while abs(ok-ng) > 1:
    mid = (ok+ng)//2
    if f(a[mid],mid):
        ok = mid
    else:
        ng = mid
print((n-ok))
# Original solution
from collections import Counter
n, m, v, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
a = a[::-1]
tmp = a[p-1]
ans = p
l = 0
r = n-1
if v <= p:
    for i in range(p, n):
        if a[i]+m >= tmp:
            ans += 1
    print(ans)
    exit()
while l<r:
    mid = (l+r)//2
    if mid<=p:
        l = mid
        continue
    if a[mid]+m<tmp:
        r = mid-1
    else:
        thresh = a[mid]+m 
        amari = (v-p)*m
        for i in range(p-1,n):
            if i==mid:
                continue
            amari-=min(m,thresh-a[i])
        if amari<=0:
            l = mid
        else:
            r=mid-1
print((r+1))

# Optimized solution
from collections import Counter
n, m, v, p = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
a = a[::-1]
tmp = a[p-1]
ans = p
l = 0
r = n
if v <= p:
    for i in range(p, n):
        if a[i]+m >= tmp:
            ans += 1
    print(ans)
    exit()
while l<r-1:
    mid = (l+r)//2
    if mid<=p:
        l = mid
        continue
    if a[mid]+m<tmp:
        r = mid
    else:
        thresh = a[mid]+m 
        amari = (v-p)*m
        for i in range(p-1,n):
            if i==mid:
                continue
            amari-=min(m,thresh-a[i])
        if amari<=0:
            l = mid
        else:
            r=mid
print((l+1))
# Original solution
# -*- coding: utf-8 -*-
N, M, V, P = list(map(int, input().split()))
A_list = list(map(int, input().split()))

A_list.sort(reverse = True)
# print(A_list)
ans = P
border = A_list[P - 1]

if P < N:
    before_A = border
    for i in range(P, N):
        if before_A == A_list[i]:
            ans += 1
#             print(1, i, A_list[i])
        elif border <= (A_list[i] + M):
            over_V = V - (P + N - (i + 1))
            if over_V > 0:
                sum_over = sum(A_list[P - 1:i]) + over_V * M
                round_up_sum_over = -(-sum_over // (i + 1 - P))
                if A_list[i] + M >= round_up_sum_over:
                    ans += 1
#                     print(2, i, A_list[i], round_up_sum_over, over_V, sum_over)
                else:
#                     print("NG", i, A_list[i], round_up_sum_over, over_V)
                    break
            else:
                ans += 1
#                 print(3, i, A_list[i])
            before_A = A_list[i]
        else:
            break
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-
N, M, V, P = list(map(int, input().split()))
A_list = list(map(int, input().split()))

A_list.sort(reverse = True)
# print(A_list)
ans = P
border = A_list[P - 1]
sum_over_A = border

if P < N:
    before_A = border
    for i in range(P, N):
        if before_A == A_list[i]:
            ans += 1
#             print(1, i, A_list[i])
        elif border <= (A_list[i] + M):
            over_V = V - (P + N - (i + 1))
            if over_V > 0:
                sum_over = sum_over_A + over_V * M
                round_up_sum_over = -(-sum_over // (i + 1 - P))
                if A_list[i] + M >= round_up_sum_over:
                    ans += 1
#                     print(2, i, A_list[i], round_up_sum_over, over_V, sum_over)
                else:
#                     print("NG", i, A_list[i], round_up_sum_over, over_V)
                    break
            else:
                ans += 1
#                 print(3, i, A_list[i])
            before_A = A_list[i]
        else:
            break
        sum_over_A += A_list[i]
print(ans)
# Original solution
N,M,V,P=list(map(int, input().split()))
*A,=list(map(int, input().split()))

A.sort()
ans=P
for i in range(N-P):
    Ax = A[-P]  #上位Pの中の最下位
    mine = A[i] + M #自分に全力で投票
    if mine < Ax: continue #逆転不能
    votes = M*V
    votes -= M #自分への票
    votes -= min(P-1, V) * M #上位陣のx以外に全力で投票
    votes -= sum([min(mine - A[j], M) for j in range(N-P+1) if i!=j]) #逆転されない程度に下位陣に投票
    if votes > 0 : continue #再逆転される
    ans += 1
print(ans)

# Optimized solution
N,M,V,P=list(map(int, input().split()))
*A,=list(map(int, input().split()))

A.sort()
Ax = A[-P]  #上位Pの中の最下位

def f(i):
    mine = A[i] + M #自分に全力で投票
    if mine < Ax: return False #逆転不能
    votes = M*V
    votes -= M #自分への票
    votes -= min(P-1, V) * M #上位陣のx以外に全力で投票
    votes -= sum([min(mine - A[j], M) for j in range(N-P+1) if i!=j]) #逆転されない程度に下位陣に投票
    if votes > 0 : return False #再逆転される
    return True

under = -1
r = N-P
while r-under>1:
    m = (r+under)//2
    if f(m): r=m
    else: under=m

print((N-r))
# Original solution
N,M,V,P=list(map(int, input().split()))
*A,=list(map(int, input().split()))

A.sort()
Ax = A[-P]  #上位Pの中の最下位

def f(i):
    mine = A[i] + M #自分に全力で投票
    if mine < Ax: return False #逆転不能
    votes = M*V
    votes -= M #自分への票
    votes -= min(P-1, V) * M #上位陣のx以外に全力で投票
    votes -= sum([min(mine - A[j], M) for j in range(N-P+1) if i!=j]) #逆転されない程度に下位陣に投票
    if votes > 0 : return False #再逆転される
    return True

under = -1
r = N-P
while r-under>1:
    m = (r+under)//2
    if f(m): r=m
    else: under=m

print((N-r))


# Optimized solution
N,M,V,P=list(map(int, input().split()))
*A,=list(map(int, input().split()))

A.sort()

#A[x]の問題が採用される可能性があるか？
def check(x):
    r = A[-P] #無投票でギリギリ採用される問題のスコア
    if A[x] + M < r:
        return False
    votes = M*V
    votes -= M # A[x]に投票
    votes -= M*(P-1) #上位の問題に投票
    votes -= M*x #下位の問題に投票
    #微妙な問題にギリギリ投票
    for i in range(x+1, N-P+1):
        votes -= A[x]+M - A[i]
    return votes <= 0

l,r=-1,N-1
while r-l>1:
    m=(l+r)//2
    if check(m):
        r=m
    else:
        l=m
print((N-r))
# Original solution
import bisect

N, M, V, P = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort()

ok = N-1
ng = -1
mid = (ok+ng)//2
while ok - ng > 1:
    if mid >= N - P:
        ok = mid
        continue
    K = A[mid] + M
    if K < A[N - P]:
        ng = mid
        mid = (ok+ng)//2
        continue
    p = M * (V-P)
    flg = 0
    for i in range(mid):
        p -= M
        if p <= 0:
            flg = 1
            break
    if flg:
        ok = mid
        mid = (ok+ng)//2
        continue
    for i in range(mid+1, N - (P-1)):
        p -= K - A[i]
        if p <= 0:
            flg = 1
            break
    if flg:
        ok = mid
        mid = (ok+ng)//2
    else:
        ng = mid
        mid = (ok+ng)//2

print((N - ok))


# Optimized solution
N, M, V, P = list(map(int, input().split()))
A = list(map(int, input().split()))
A.sort()

ok = N-1
ng = -1
mid = (ok+ng)//2
while ok - ng > 1:
    if mid >= N - P:
        ok = mid
        mid = (ok+ng)//2
        continue
    K = A[mid] + M
    if K < A[N - P]:
        ng = mid
        mid = (ok+ng)//2
        continue
    p = M * (V-P)
    flg = 0
    for i in range(mid):
        p -= M
        if p <= 0:
            flg = 1
            break
    if flg:
        ok = mid
        mid = (ok+ng)//2
        continue
    for i in range(mid+1, N - (P-1)):
        p -= K - A[i]
        if p <= 0:
            flg = 1
            break
    if flg:
        ok = mid
        mid = (ok+ng)//2
    else:
        ng = mid
        mid = (ok+ng)//2

print((N - ok))
# Original solution
#!/usr/bin/env python3
import sys
from itertools import accumulate
INF = float("inf")


def solve(N: int, M: int, V: int, P: int, A: "List[int]"):

    ans = 0

    # 降順
    A.sort(reverse=True)

    acc = [0]+list(accumulate(A))

    for i in range(N):
        # ソート後の冒頭P問は大きいので可
        if i < P:
            ans += 1
            continue
        # M人が投票してもP番目のスコアに届かないなら無駄。
        if A[i]+M < A[P-1]:
            continue

        # 対象iがP問目として選ばれるために
        # 許容可能な投票数と、実際の投票数を比較する。
        cap = 0
        # 始めのP-1問にはM人が投票してよい
        cap += M*(P-1)
        # 後ろのN-i問(i, i+1, ..., N-1)にはM人が投票して良い
        cap += M*(N-i)
        # P問目からi-1問目までは、A[i]+Mを超えない範囲で投票して良い
        # \sum_{j = P-1}^{i-1} A[i]+M-A[j]
        # = (i-P+1)*(A[i]+M) - \sum_{j=P-1}^{i-1}A[j]
        cap += (i-P+1)*(A[i]+M)
        # accは始めに0を加えているので、インデックスが異なるので注意
        # 数列(0-index)のi-1番目までの和はacc[i](0-index)
        cap -= acc[i] - acc[P-1]
        if cap >= M*V:
            ans += 1
    print(ans)

    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
    M = int(next(tokens))  # type: int
    V = int(next(tokens))  # type: int
    P = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, M, V, P, A)


if __name__ == '__main__':
    main()


# Optimized solution
#!/usr/bin/env python3
import sys
from itertools import accumulate
INF = float("inf")


def solve(N: int, M: int, V: int, P: int, A: "List[int]"):

    ans = 0

    # 降順
    A.sort(reverse=True)
    acc = [0]+list(accumulate(A))

    left = P-1
    right = len(A)
    while right - left > 1:
        mid = (right + left)//2
        if A[mid]+M < A[P-1]:
            right = mid
            continue

        cap = M*N+(mid-P+1)*(A[mid]) - acc[mid] + acc[P-1]
        if cap >= M*V:
            left = mid
        else:
            right = mid
    print((left+1))

    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
    M = int(next(tokens))  # type: int
    V = int(next(tokens))  # type: int
    P = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, M, V, P, A)


if __name__ == '__main__':
    main()
# Original solution
import sys
input=sys.stdin.readline
n,m,v,p=list(map(int,input().split()))
a=[int(i) for i in input().split()]
a.sort(reverse=True)
a=a[p-1:]
le=len(a)
l,r=0,le-1

def adopt(x):
    global a,n,m,v
    b=a[x]+m
    if b<a[0]:
        return False
    al=(v-(n-x))*m
    s=x*b-sum(a[:x])
    return al<=s

while l+1<r:
    k=(l+r)//2
    if adopt(k):
        l=k
    else:
        r=k

if adopt(r):
    print((p+r))
else:
    print((p+l))


# Optimized solution
import sys
n,m,v,p=list(map(int,sys.stdin.readline().split()))
a=list(map(int, sys.stdin.readline().split()))
#a=[int(i) for i in sys.stdin.readline().split()]
a.sort(reverse=True)
a=a[p-1:]
l,r=0,n-p

def adopt(x):
    global a,n,m,v
    b=a[x]+m
    if b<a[0]:
        return False
    al=(v-(n-x))*m
    s=x*b-sum(a[:x])
    return al<=s

while l+1<r:
    k=(l+r)//2
    if adopt(k):
        l=k
    else:
        r=k

if adopt(r):
    print((p+r))
else:
    print((p+l))
# Original solution
import sys
n,m,v,p=list(map(int,sys.stdin.readline().split()))
a=sorted(list(map(int, sys.stdin.readline().split())),reverse=True)[p-1:]
l,r=0,n-p

while l+1<r:
    k=(l+r)//2
    b=a[k]+m
    if b<a[0] or (v-(n-k))*m>(k*b-sum(a[:k])):
        r=k
    else:
        l=k

b=a[r]+m
if b<a[0] or (v-(n-r))*m>(r*b-sum(a[:r])):
    print((p+l))
else:
    print((p+r))


# Optimized solution
n,m,v,p=list(map(int,input().split()))
a=sorted(list(map(int, input().split())),reverse=True)[p-1:]
l,r=0,n-p
while l+1<r:
    k=(l+r)//2
    b=a[k]+m
    if b<a[0] or (v-(n-k))*m>(k*b-sum(a[:k])):
        r=k
    else:
        l=k
b=a[r]+m
print((p+l if(b<a[0] or (v-(n-r))*m>(r*b-sum(a[:r]))) else p+r))
# Original solution
import bisect

N,M,V,P = list(map(int,input().split()))
A = sorted([int(i) for i in input().split()])

#A = [[int(i),x]for x,i in enumerate(input().split())]

target = P

con = 0

for i in range(N):
  x = A[i]
  x = x + M
  
  #xより小さい値の個数
  y = bisect.bisect_left(A,x)
  #xの個数
  c = A.count(x)

  #振り分け範囲より、xの上限を下回る数が多い場合
  ##…xがAのなかでP番目に入れればカウントする
  if y > V - 1:
    bigger = N - y - c
    if target > bigger:
      con += 1
  #そうでなければ
  ##xの上限数を下回るYの数y個分振り分けた後
  ##xの上限数を同等または上回る値の個数zが、
  ##入っているべき順位より小さければカウントする
  else:
    z = N - y
    if V - y - 1 < z and target - 1 > z:
      con += 1

print(con)

# Optimized solution
N,M,V,P = list(map(int,input().split()))
A = sorted([int(i) for i in input().split()],reverse = True)

pps = 0
con = P

for i in range(P,N):
  #P以降でi番目に大きい数を加算
  pps += A[i - 1]

  #xの上限が順位に入らない
  if A[i] + M < A[P - 1]:
    break
  #点数をいくら振り分けてもいいスコアの数
  fv = min(P - 1 + N - i, V)
  #左辺第二項は、P以降とi以前の、点数の振り分け可能数に上限がある数
  #左辺は振り分けた後にA[i]がP入りを果たせる区間の総和の上限を示す
  #右辺第一項は、振り分け可能数に上限がある数の総和
  #右辺第二項は、振り分けないといけない数の残り
  #右辺は、点数を振り分けた後の値の区間の総和を示すため、
  #右辺が左辺を上回った場合、ループは終了となる
  if (A[i] + M) * (i - P + 1) < pps + M * (V - fv):
    break
  con += 1
  
print(con)
# Original solution
import math

def main():
    N = int(eval(input()))
    ans = False
    for i in range(N+1):
        x = math.floor(i * 1.08)
        if x == N:
            print(i)
            ans = True
            break
    if not ans:
        print(':(')

if __name__ == "__main__":
    main()

# Optimized solution
import math

def main():
    N = int(eval(input()))
    ans = ':('
    for i in range(N+1):
        x = int(i * 1.08)
        if x == N:
            ans = i
    print(ans)

if __name__ == "__main__":
    main()
# Original solution
def main(N, rate=1.08):
    X = int(-(-N // 1.08))
    return X if int(X * rate) == N else -1


if __name__ == "__main__":
    N = int(eval(input()))
    ans = main(N)
    print((ans if ans > 0 else ':('))


# Optimized solution
N = int(eval(input()))
X = int(-(-N // 1.08))
print((X if int(X * 1.08) == N else ':('))
# Original solution
#!/usr/bin/env python3
#三井住友信託銀行プログラミングコンテスト2019 B

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
for i in range(500001):
    if int(i*1.08) == n:
        print(i)
        break
else:
    print(':(')

# Optimized solution
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
for i in range(10**6+1):
    if (i * 108) // 100 == n:
        print(i)
        quit()
print(":(")
# Original solution
import math
n = float(eval(input()))
m = n / 1.08
if math.floor(math.floor(m) * 1.08) == n:
    print((math.floor(m)))
elif math.floor(math.ceil(m) * 1.08) == n:
    print((math.ceil(m)))
else:
    print(':(')

# Optimized solution
from math import ceil
from math import floor
n = int(eval(input()))
x = n / 1.08
if floor(floor(x) * 1.08) == n:
    print((floor(x)))
elif floor(ceil(x) * 1.08) == n:
    print((ceil(x)))
else:
    print(':(')
# Original solution
n=int(eval(input()))

ans=-1
for i in range(1,n+1):
  if int(i*1.08)==n:
    ans=i

if ans!=-1:
  print(ans)
else:
  print(":(")

# Optimized solution
import math
n=int(eval(input()))
for i in range(1,n+1):
  if math.floor(i*1.08)==n:
    print(i)
    break
  else:
    continue
else:
  print(":(")
# Original solution
n = int(eval(input()))

for x in range(n + 1):
    if int(x * 1.08) == n:
        print(x)
        exit()
print(':(')


# Optimized solution
from math import ceil

n = int(eval(input()))
x = ceil(n / 1.08)
print((x if int(x * 1.08) == n else ':('))

# n=floor(x*1.08)
# n<=x*1.08<n+1
# n/1.08<=x<(n+1)/1.08

# xの必要条件は、
# n/1.08<=x<(n+1)/1.08
# xは整数

# xは整数とn/1.08<=xから、
# ceil(n/1.08)である必要があるので、これがnに一致すれば、
# n/1.08<=x<(n+1)/1.08
# この範囲に整数がある
# Original solution
def readinput():
    n=int(eval(input()))
    return n

def main(n):
    x7=int(n/1.07)
    x8=int(n/1.08)
    x9=int(n/1.09)
    n100=n*100
    for x in range(max(1,x9-1),x7+1+1):
        xx=x*108//100
        #print(x,xx)
        if xx==n:
            print(x)
            break
    else:
        print(':(')

        

if __name__=='__main__':
    n=readinput()
    main(n)


# Optimized solution
def readinput():
    n=int(eval(input()))
    return n

def main(n):
    x7=int(n/1.07)+1
    x9=int(n/1.09)-1
    n100=n*100
    for x in range(max(1,x9),x7+1):
        xx=x*108//100
        #print(x,xx)
        if xx==n:
            print(x)
            break
    else:
        print(':(')

        

if __name__=='__main__':
    n=readinput()
    main(n)
# Original solution
import math
n = int(eval(input()))
x1 = math.ceil(n/1.08)
print((':(' if math.floor(x1*1.08) != n else x1))

# Optimized solution
import math
n = int(eval(input()))
lx = math.ceil(n/1.08)
rx = (n+1)/1.08
print((lx if lx<rx else ':(' ))
# Original solution
def main():
    n = int(eval(input()))

    x = int(n/1.08)
    if int(x * 1.08) == n:
        print(x)
    elif int((x + 1) * 1.08) == n:
        print((x + 1))
    elif int((x - 1) * 1.08) == n:
        print((x - 1))
    else:
        print(":(")

if __name__ == "__main__":
    main()

# Optimized solution
import math
def main2():
    n = int(eval(input()))
    x = int(math.ceil(n / 1.08))
    
    if int(x*1.08) == n:
        print(x)
    else:
        print(":(")

if __name__ == "__main__":
    main2()
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(eval(input()))

def bs(ok, ng, solve):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(ok=n, ng=0, solve=(lambda x: x * 1.08 >= n))
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')


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

n = int(eval(input()))

def bs(ok, ng, solve):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(n, 0, lambda x: x * 1.08 >= n)
if int(ans * 1.08) == n:
    print(ans)
else:
    print(':(')
# Original solution
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(eval(input()))

def bs(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return ok

ans = bs(n, 0, lambda x: x * 1.08 >= n)
if n == int(ans * 1.08):
    print(ans)
else:
    print(':(')


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

n = int(eval(input()))

def binary_search(ok, ng, cond):
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if cond(mid):
            ok = mid
        else:
            ng = mid
    return ok

candidate = binary_search(n, 0, lambda x: x * 1.08 >= n)
if n == int(candidate * 1.08):
    print(candidate)
else:
    print(':(')
# Original solution
n=int(eval(input()));l=[0,1];a=0;b=c=1;p=998244353
for i in range(2,n):l+=[l[p%i]*(p-p//i)%p]
for i in range(n,n//2,-1):a+=b*c%p;b+=b%p;c=c*i*l[n+1-i]%p
print(((pow(3,n,p)-2*a)%p))

# Optimized solution
n=int(eval(input()));l=[0,1];a=0;b=c=1;p=998244353
for i in range(2,n):l+=[l[p%i]*(p-p//i)%p]
for i in range(n,n//2,-1):a+=b*c;b+=b%p;c=c*i*l[n+1-i]%p
print(((pow(3,n,p)-2*a)%p))
# Original solution
from itertools import product


candidates = set()
non_as = ["KIH", "B", "R", ""]
for seps in product(["A", ""], repeat=4):
    candidates.add("".join(sep + non_a for sep, non_a in zip(seps, non_as)))

print("YES") if input() in candidates else print("NO")


# Optimized solution
from itertools import product


candidates = []
non_as = ["KIH", "B", "R", ""]
for seps in product(["A", ""], repeat=4):
    candidates.append("".join(sep + non_a for sep, non_a in zip(seps, non_as)))

print("YES") if input() in candidates else print("NO")
# Original solution
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    for s in "KIHBR":
        if S.count(s) != 1:
            print("NO")
            exit()

    A = S.count("A")
    if len(S) - A != 5:
        print("NO")
        exit()

    K = S.find("K")
    I = S.find("I")
    H = S.find("H")
    B = S.find("B")
    R = S.find("R")
    if not (K < I < H < B < R):
        print("NO")
        exit()
    if K > 1:
        print("NO")
        exit()
    if I - K != 1:
        print("NO")
        exit()
    if H - I != 1:
        print("NO")
        exit()
    if B - H > 2:
        print("NO")
        exit()
    if R - B > 2:
        print("NO")
        exit()
    if len(S) - 1 - R > 1:
        print("NO")
        exit()

    print("YES")


if __name__ == "__main__":
    main()


# Optimized solution
import sys

input = sys.stdin.readline


def main():
    S = input().rstrip()

    # AKIHABARA
    correct_list = [
        "AKIHABARA",
        "KIHABARA",
        "AKIHBARA",
        "AKIHABRA",
        "AKIHABAR",
        "KIHBARA",
        "KIHABRA",
        "KIHABAR",
        "AKIHBRA",
        "AKIHBAR",
        "AKIHABR",
        "KIHBRA",
        "KIHBAR",
        "KIHABR",
        "AKIHBR",
        "KIHBR",
    ]

    is_correct = False
    for correct in correct_list:
        if S == correct:
            is_correct = True
            break

    if is_correct:
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()