peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
print('Yes' if A+2*B>=C else 'No')
# Judge status: Wrong Answer
N,A,B = map(int,input().split())
S = list(input())

ans = []
df = 0
f = 0

for i in range(N):
  s = S[i]
  if s == 'c':
    ans.append('No')
    continue
  elif s == 'a':
    df += 1
    if df < A:
      ans.append('Yes')
    else:
      ans.append('No')
  elif s == 'b':
    df += 1
    f += 1
    if df < A and f <= B:
      ans.append('Yes')
    else:
      ans.append('No')
      
print('\n'.join(ans))
# Judge status: Accepted
h = int(input())
w = int(input())
n = int(input())
if w>=h:
  print( -(-n//w) )
else:
  print( -(-n//h) )
# Judge status: Wrong Answer
n = int(input())

print(3.1415 * n)
# Judge status: Wrong Answer
n=input();s=input();print(sum([[-1,1][i=='I'] for i in s])+1)
# Judge status: Wrong Answer
a = int(input())
b = int(input())

if (a == 1 and b == 2) or (a == 2 and b == 1):
    print(3)
elif (a == 1 and b == 3) or (a == 3 and b == 1):
    print(2)
elif (a == 2 and b == 3) or (a == 2 or b == 3):
    print(1)
# Judge status: Accepted
N, M = map(int, input().split())
L, R = [0]*M, [0]*M
for i in range(M):
    L[i],R[i] = map(int, input().split())

a, b = max(L), min(R)
if a<=b:
    print(b-a+1)
else:
    print(0)
# Judge status: Wrong Answer
from collections import Counter


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

C = Counter(A)

cnt = 0
for key, value in C.items():
    cnt += min(value, abs(key - value))

print(cnt)
# Judge status: Wrong Answer
n = int(input())
p = list(map(int,input().split()))
i = 1
res = 0
while i < n-1:
    if p[i-1] == i:
        res += 1
        i += 1
    i += 1
print(res)
# Judge status: Accepted
def Multiple_Gift(x , y):

    ans = 1

    while x < y:
        if x * 2 <= y:
            ans += 1
        x = x * 2

    return ans

def main():
    x , y = map(int , input().split())
    print(Multiple_Gift(x , y))

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, m = inintm()

ship = []

t = 0

for _ in range(m):
    a, b = inintm()
    ship.append([a, b])
    if a == 1:
        t = b

if t == 0:
    print("IMPOSSIBLE")
    exit()

for i in ship:
    if i[0] == t and i[1] == n:
        print("POSSIBLE")
        exit()

print("IMPOSSIBLE")
# Judge status: Accepted
n,r=map(int,input().split())

if n>=10:
  print(r)
else:
  print(r+(10-n)*100)
# Judge status: Wrong Answer
K = int(input())
S = input().lower()

if len(S) < K:
    print(S)
elif len(S) > K:
    print(f"{S[0:K]}{'...'}")
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

up = False
down = False
ans = 1

for i in range(1, n):
    if up:
        if a[i] < a[i-1]:
            ans += 1
            up = False
    elif down:
        if a[i] > a[i-1]:
            ans += 1
            down = False
    else:
        if a[i] > a[i-1]:
            up = True
        elif a[i] < a[i-1]:
            down = True

print(ans)
# Judge status: Accepted
from math import gcd

def factorization(N):
    res=[]
    for i in range(2,int(N**(1/2))+2):
        if not N%i:
            r=0
            while not N%i:
                N//=i
                r+=1
            res.append((i,r))
    if N>1:
        res.append((N,1))
    return res
a,b=map(int,input().split())
g=gcd(a,b)
print(1+len(factorization(g)))
# Judge status: Accepted
r = int(input())
print(3.1415*2*r)
# Judge status: Accepted
n, m = map(int, input().split())
k = []
for i in range(n):
    a = list(map(int, input().split()))
    k.append(a)

ans = [0]*m
for i in range(n):
    for j in range(1,k[i][0]+1):
        ans[k[i][j]-1] += 1

print(ans.count(n))
# Judge status: Wrong Answer
N, X, Y = map(int, input().split())

d = {}

for i in range(1, N):
    for j in range(i + 1, N + 1):
        if j >= Y and i <= X:
            d[(i, j)] = min(j - i - (Y - X) + 1, j - i)    
        elif i <= X:
            d[(i, j)] = min(j - i, 2 * Y - i - j)    
        else:
            d[(i, j)] = j - i

ans = [0] * (N - 1)

for k, v in d.items():
    ans[v - 1] += 1

for v in ans:
    print(v)
# Judge status: Wrong Answer
from collections import defaultdict

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


dd = defaultdict(int)

for _ in range(n):
    a, b = map(int, input().split())
    dd[a] += b

cnt = 0
for key, v in dd.items():
    cnt += v
    if k <= cnt:
        print(key)
        break
# Judge status: Wrong Answer
def main():
    n = int(input())
    h = list(map(int, input().split()))
    # dpテーブル作成,スタート地点のdpテーブルの値は0にする
    dp =[10**5] * n
    dp[0] = 0
    dp[1] = abs(h[0] - h[1])
    for i in range(2,n):
        dp[i] = min([dp[i], dp[i-1]+abs(h[i-1]-h[i]), dp[i-2]+abs(h[i-2]-h[i])])
    print(dp[n-1])

if __name__ == "__main__":
    main()
# Judge status: Accepted
x = int(input())

a = 1
now = 0
while True:
    now += a
    a += 1
    if now >= x:
        print(a - 1)
        exit()
# Judge status: Accepted
n,k = map(int,input().split())
p = sorted(list(map(int,input().split())))
print(sum(p[:k]))
# Judge status: Wrong Answer
k, n = map(int , input().split())
lis = list(map(int,input().split()))
mi = [min(lis)] * n
li = [x - y for (x, y) in zip(lis, mi)]

ans1 = 0
for i in range(n - 1):
    ans1 += li[(i + 1)] - li[i]

chuten = k / 2
for i,j in enumerate(li):
  if j > chuten:
    li[i] = j - k
li.sort()
ans2 = 0
for i in range(n - 1):
    ans2 += li[(i + 1)] - li[i]

print(min(ans1, ans2))
# Judge status: Accepted
import sys
import numpy as np

n, d, *x = map(int, sys.stdin.read().split())
x = np.array(x, dtype=np.int64).reshape(n, d)

def main():
    cnt = 0
    for i in range(n-1):
        for j in range(i+1, n):
            dist = np.sqrt(((x[i] - x[j]) ** 2).sum())
            if dist == int(dist):
                cnt += 1
    
    return cnt
    
if __name__ == '__main__':
    ans = main()
    print(ans)
# Judge status: Accepted
X,Y = map(int, input().split())

if X%Y == 0:
    print(-1)
else:
    i = 1
    while 1:
        if X*i > 10**18:
            print(-1)
            break
        elif X*i%Y!=0:
            print(X*i)
            break
        else:
            i+= 1
# Judge status: Wrong Answer
AB,BC,CU = input().split()
AB = int(AB)
BC = int(BC)
CU = int(CU)

area = (AB * BC )/ 2
print(area)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
d = {}

for x in a:
    d[x] = d.get(x, 0) + 1

t = max(d.values())

print("Yes") if t == 1 else print("No")
# Judge status: Wrong Answer
O = input()
#atcoderbeginnercontest

E = input()
#atcoderregularcontest
S = []

if len(O) == len(E):
	for i in range(len(O)):
		S.append(O[i] + E[i])
else:
	for i in range(len(E)):
		S.append(O[i] + E[i])
		S.append(O[-1])

print("".join(S))
# Judge status: Wrong Answer
A,B,C,K=map(int, input().split())
ans=0
ans=B-A if K %2==0 else A-B
if ans > 10**18:
  print('Unfair')
else:
  print(ans)
# Judge status: Accepted
N = int(input())
P = list(map(int, input().split()))
count = 0
for i, p in enumerate(P):
    if p == i+1 and i == N-1:
        count += 1
    elif p == i+1:
        count += 1
        P[i] = P[i+1]
        P[i+1] = p

print(count)
# Judge status: Accepted
n=int(input())
s=[int(input()) for _ in range(n)]

sum=0
for i in s:
      sum+=i

if sum%10!=0:
      print(sum)
      exit()

s.sort()
for i in s:
      if i%10!=0:
            sum-=i
            print(sum)
            exit()

print(0)
# Judge status: Accepted
N=int(input())
memo=[[0 for _ in range(10)] for _ in range(10)]
for i in range(1, N+1):
  memo[i//(10**(len(str(i))-1))][i%10]+=1
ans=0
for i in range(10):
  for j in range(10):
    ans+=memo[i][j]*memo[j][i]
print(ans)
# Judge status: Accepted
# Tap Dance

# input
S = input()

# solve
cond1 = sum([s == 'L' for s in S[::2]])
cond2 = sum([s == 'R' for s in S[1::2]])

# output
if cond1 == 0 and cond2 == 0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
h, a = map(int, input().split())

n = 0
while h <= 0 :
  h - a
  n += 1
  
print(n)
# Judge status: Wrong Answer
n, a, b = map(int, input().split())
c = a + b

if c < n:
  a += n-c

print(a)
# Judge status: Wrong Answer
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

n = readInt()
c = Counter(readInts())

ans = 0
for i in c:
	if c[i]-i>0:
		ans+=c[i]-i
	else:
		ans+=min(i-c[i],c[i])

print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = input()

table = [-1 for i in range(len(t) + k)]
count = 0
for i in range(len(t)):
    if table[i-k] != -1 and table[i-k] == t[i]:
        continue
    elif t[i] == "r":
            count += p
            table[i] = "r"
    elif t[i] == "s":
            count += r
            table[i] = "s"
    elif t[i] == "p":
            count += s
            table[i] = "p"

print(count)
# Judge status: Accepted
import math
money = 100
x = int(input())
i = 0
while money < x:
    money = math.floor(money*1.01)
    i += 1
print(i)
# Judge status: Accepted
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
#import heapq
#from fractions  import gcd
#input=sys.stdin.readline
import bisect
n,m,q=map(int,input().split())
l=[i for i in range(1,m+1)]
ab=[list(map(int,input().split())) for _ in range(q)]
ans=0
for res in itertools.combinations_with_replacement(l, n):
    ans_r=0
    for i in range(q):
        a,b,c,d=ab[i]
        if c==res[b-1]-res[a-1]:
            ans_r+=d
    ans=max(ans,ans_r)
print(ans)
# Judge status: Wrong Answer
N = int(input())
List = []
for i in range (2):
  List.append(list(map(int, input().split())))
sumList1 = [0]*N
sumList2 = [0]*N
for i in range(N):
  if i == 0:
    sumList1[i] = List[0][i]
    sumList2[N-1-i] = List[1][N-1-i]
  else:
    sumList1[i] = List[0][i]+sumList1[i-1]
    sumList2[N-1-i] = List[1][i]+sumList2[N-i]
res = 0
for i in range(N):
  res = max(sumList1[i]+sumList2[i],res)
print(res)
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a >= 13:
    print(b)
elif 12 >= a and a>= 6:
    print(b / 2)
else:
    print(0)
# Judge status: Accepted
import collections

def main():
    s = str(input())

    if len(s) % 2 == 0:
        for i in range(len(s)//2):
            if s[0+2*i:2+2*i] != 'hi':
                print('No')
                break
    
        else:
            print('Yes')
    else:
        print('No')



if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
Q = [''] * N
for i in range(N):
    Q[A[i] - 1] = str(i + 1)
print(' '.join(Q))
# Judge status: Wrong Answer
def gcd(n,m):
    if n < m:
        t = n
        n = m
        m = t
    r = n % m
    while r > 0:
        n, m = m, r
        r = n % m
    return m
from itertools import accumulate
def GCD(args):
    return list(accumulate(args,gcd))[-1]
N = int(input())
T = [int(input()) for _ in range(N)]
g = GCD(T)
ans = g
for t in T:
    ans *= t//g
print(ans)
# Judge status: Wrong Answer
import bisect
import math
n,h = map(int,input().split())
a,b = [0]*n,[0]*n
for i in range(n):
	a[i],b[i] = map(int,input().split())
a.sort()
b.sort()

d = 0
for i in range(n-bisect.bisect_right(b,a[n-1])):
	d += b[n-1-i]
if math.floor((h-d)/a[n-1])*a[n-1] + d >= h:
	print(math.floor((h-d)/a[n-1]) + n-bisect.bisect_right(b,a[n-1]))
else:
	print(math.ceil((h-d)/a[n-1]) + n-bisect.bisect_right(b,a[n-1]))
# Judge status: Accepted
N = int(input())
MOD = 1000000007
power = 1
for i in range(1, N + 1):
    power *= i
    power %= MOD
print(power)
# Judge status: Wrong Answer
a, b, c, x, y = map(int, input().split())
ans = x * a + y * b
ans = min(ans, abs(x - y) * a + min(x, y) * c * 2)
ans = min(ans, max(x, y) * c * 2)
print(ans)
# Judge status: Accepted
N = int(input())
S = input()
if N % 2 !=0:
    print('No')
else:
   n = int(N/2)  
   s1 = S[:n]
   s2 = S[n:]
   if s1 == s2:
       print('Yes')
   else:
       print('No')
# Judge status: Wrong Answer
a,b = map(int,input().split())

r = b*2+1

if a%b == 0:
    print(a//b)
else:
    print(a//b+1)
# Judge status: Accepted
s = str(input())

if s.isupper():
  print("A")
else:
  print("a")
# Judge status: Accepted
#!/usr/bin/env python3

def main():
    *N, = map(int, open(0).read().split())
    h = N[2:]
    K = N[1]
    N = N[0]

    h.sort(reverse=True)
    ans = max(h) - min(h)
    for i in range(0, N - K + 1):
        d = h[i] - h[i + K -1]
        if d < ans:
            ans = d
    print(ans)


main()
# Judge status: Accepted
S = input()
List = list(S)

ans = 0
arr = []
for i in range(len(List)):
  if List[i] == "A" or List[i] == "C" or List[i] == "G" or List[i] == "T":
    ans += 1
  else:
    arr.append(ans)
    ans = 0
    
arr.append(ans)

print(max(arr))
# Judge status: Wrong Answer
li = list(map(int,input().split()))
for i in range(0,5):
  if li[i] == 0:
    print(i)
# Judge status: Wrong Answer
n=input()
a=len(n)
b=0
for i in range(a):
  b=b+int(n[i])
print(b)
# Judge status: Accepted
a,b,m=[int(i) for i in input().split(" ")]
a=[int(i) for i in input().split(" ")]
b=[int(i) for i in input().split(" ")]

min=min(a)+min(b)

for i in range(m):
    x,y,c=[int(i) for i in input().split(" ")]
    val=a[x-1]+b[y-1]-c
    if val<min:
        min=val

print(min)
# Judge status: Accepted
x = int(input())

ans = 0
for i in range(1,32):
    for p in range(2,10):
        y = i**p
        if y > 1000:
            break
        if ans < y <= x:
            ans = y
print(ans)
# Judge status: Wrong Answer
x = int(input())
if x<11:
    print(1 if x <= 6 else 2)
else:
    t = x // 11
    t += t
    if t % 11 != 0:
        t += 1
    print(t)
# Judge status: Accepted
x, y = map(int, input().split())

print(x+y//2)
# Judge status: Wrong Answer
print("YES")if "9"in input()else print("No")
# Judge status: Accepted
import math
N,K = map(int,input().split())


print('{:.12f}'.format(sum([(1/N)*(0.5)**math.ceil(math.log2(math.ceil(K/i))) if i<K else 1/N for i in range(1,N+1)])))
# Judge status: Accepted
x,y,z = map(int, input().split())

print((x-z) // (y+z))
# Judge status: Wrong Answer
A,B,C,D = map(int,input().split(' '))
if B < C:
  print(0)
else:
  print(min(B-A,min(D-C,B-C)))
# Judge status: Accepted
n = list(map(int, input().split()))
n_max = n[0] * n[2]
for i in range(0, 2):
    for j in range(2, 4):
        if n_max < n[i] * n[j]:
            n_max = n[i] * n[j]
print(n_max)
# Judge status: Accepted
#import bisect
import heapq
from collections import deque
n,m = map(int,input().split())
ab=[]
for i in range(n):
    ab.append(list(map(int,input().split())))

lis = [[]for i in range(m)]

for i in range(n):
    if ab[i][0]<=m:
        lis[ab[i][0]-1].append(ab[i][1])

pys = []
heapq.heapify(pys)
sum = 0
for i in range(m):
    tmp = lis[i]
    if tmp:
        for j in tmp:
            heapq.heappush(pys,-j)
    if pys:
        sum-=heapq.heappop(pys)

print(sum)
# Judge status: Wrong Answer
from collections import deque

N = int(input())
H = deque(map(float, input().split()))

j = []
count = 0
prev = H.popleft()

for i in range(N-1):
    cor = H.popleft()
    if cor - prev < -1:
        print('No')
        exit()
    elif cor - prev == -1:
        j.append(cor - prev)
        count += 1
    else:
        j.append(cor - prev)

    if count >= 2:
        print('No')
        exit()

    prev = cor

print('Yes')
# Judge status: Accepted
x,y=map(int,input().split())
if x%y==0:
  print("-1")
else:
  for i in range(1,x*y):
    if x*i%y!=0:
      print(x*i)
      exit()
# Judge status: Wrong Answer
a,b,c,d=map(int,input().split())
if c<b<d:
    print(b-max([a,c]))
elif a<d<b:
    print(d-max([a,c]))
else:
    print(0)
# Judge status: Accepted
N,K = [int(x) for x in input().split()]
S =list(input())

S[K-1]=S[K-1].lower()
S = "".join(S)
print(S)
# Judge status: Accepted
A, B, C = map(int, input().split())

if A+B >= C:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
def resolve():
    s = input()
    len(s)

    for i in range(len(s)):
        s = s[0 : -1]
        #print(f"{s} length is {len(s)}")
        if len(s) % 2 == 0:
            sa = s[0 : int(len(s)/2)]
            sb = s[int(len(s)/2) : ]
            #print(f"sa is {sa} \nsb is {sb}")
            if sa == sb:
                print(len(s))
                break
resolve()
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

# In[32]:


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


# In[33]:


mylist4 = [1 if x%4 == 0 else 0 for x in a]
mylist2 = [1 if x%2 == 0 else 0 for x in a]
b4 = sum(mylist4)
b2 = sum(mylist2)-b4
b1 = N-b2-b4
if b2 == 0:
    if b1 <= b4+1:
        print("Yes")
    else:
        print("No")
else:
    if b1 <= b4:
        print("Yes")
    else:
        print("No")


# In[ ]:





# In[ ]:
# Judge status: Wrong Answer
s = input()
t = input()


ans = 0
for i in range(len(t)+1, 0, -1):
    for j in range(0, len(t)-i+1):
        if t[j:j+i] in s:
            #print(t[j:j+i], s[j:len(t)-j+i])
            ans = i
            break


print(len(t)-ans)
# Judge status: Accepted
N,K = map(int,input().split())
p = list(map(int,input().split()))

def kitaiti(n):
    return 0.5*n + 0.5

ans = 0

s=[0]*(N+1)
for i in range(N):
    s[i+1] = s[i] + p[i]

for i in range(N-K+1):
    val = s[K+i] - s[i]
    if ans<val:
        ans = val

print(kitaiti(ans)+0.5*(K-1))
# Judge status: Accepted
import numpy as np
a, b, h, m = map(int, input().split())
h_deg = (h*60+m)/720
m_deg = m/60
deg = max(h_deg-m_deg, m_deg-h_deg)
deg = 1.0-deg if deg > 0.5 else deg
if deg == 0.5:
    print('{:.20f}'.format(a+b))
else:
    print('{:.20f}'.format(np.sqrt(a**2+b**2-(2*a*b*np.cos(2*np.pi*deg)))))
# Judge status: Accepted
x, y = map(int, input().split())

result = x * y 

print(result)
# Judge status: Wrong Answer
r, g, b = map(int,input().split())
ans = 100*r + 10 *g + b
if ans % 4 == 0:
    print('Yes')
else :
    print('No')
# Judge status: Wrong Answer
a, b, c, d = map(int, input().split())
x=abs(b-a)
y=abs(c-b)
z=abs(c-a)

if z <= d:
    print('Yes')
elif y <= d and z <= d:
    print('Yes')

else:
    print('No')
# Judge status: Accepted
from collections import Counter
n = int(input())
s = input()
mod = 1000000007
ans = 1
cnt = Counter(s)
for v in cnt.values(): ans = ans*(v+1)%mod
ans = (ans-1)%mod
print(ans)
# Judge status: Wrong Answer
def main():
    N = int(input())
    L = [list(map(int, input().split())) for _ in range(N)]
    tmp = []
    for a, b in L:
        tmp.append([a-b, a+b])
    tmp.sort()
    t = tmp[0][0]- 1
    c = 0

    for i in range(N):

        if t > tmp[i][0]:
            c += 1
        else:
            t = tmp[i][1]
    print(N-c)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
import collections
N=int(input())
L=[input() for i in range(N)] 
C = collections.Counter(L)
D = list(C.values())
E=sum(D)
print(E)
# Judge status: Wrong Answer
x = str(input())
y = str(input())

conditions = x[0] == y[2] and x[1] == y[1] and x[2] == y[0]

if conditions:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n = int(input())  # nは入力回数

a = n-1 
count = 0 
d = 0

for l in range(n):
  d = int(a/(l+1))
  
  if d > (l+1):
    count += (d-l-1)*2+1
  else:
    break

print(count)
# Judge status: Wrong Answer
h,w = map(int, input().split())
area = h*w
ans =  area // 2 +1
print(ans)
# Judge status: Wrong Answer
a,s,c = input().split()

S = s[0]

print(a + S + c)
# Judge status: Wrong Answer
n,m=map(int,input().split())
s=set([1])
b=[1]*(n+1)
for i in range(m):
  x,y=map(int,input().split())
  if x in s:
    s.add(y)
    b[x]-=1
    b[y]+=1
    if b[x]==0:
      s.remove(x)
print(len(s))
# Judge status: Wrong Answer
n, k = map(int, input().split())
x = list(map(int, input().split()))
min_time  = abs(x[0]) + abs(x[-1] - x[0])

for i in range(n-k+1):
    time = abs(x[i]) + abs(x[i+k-1] - x[i])
    if time < min_time:
        min_time = time

print(min_time)
# Judge status: Accepted
n, k = map(int, input().split())

MOD = 10**9+7
n += 1
ans = 0
for i in range(k, n+1):
    p = i*(2*n - (i-1)) // 2
    m = i*(2 + i-1) // 2
    ans += p - m + 1
print(ans % MOD)
# Judge status: Wrong Answer
import collections

N = int(input())
l = [input() for _ in range(N)]

c = collections.Counter(l)

L = c.most_common()

values, counts = zip(*c.most_common())

A = list(values)
B = list(counts)

b = B.count(B[0])
# Judge status: Accepted
N,A,B = map(int,input().split())
x = 0
count = 0
s = ""
for i in range(1,N+1):
    s = str(i)
    for j in range(len(str(i))):
        x += int(s[j])
    if x >= A and x <= B:
        count += i
    x = 0
print(count)
# Judge status: Accepted
import sys
from bisect import bisect_right
n = int(input())
data = [n*(n+1)//2 for n in range(1,40)]
cnt2 = 0
while n % 2 == 0:
    cnt2 += 1
    n //= 2
ans = bisect_right(data,cnt2)
if n == 1:
    print(ans)
    sys.exit()
for i in range(3,int(n**(0.5))+1,2):
    cnt = 0
    while n % i == 0:
        cnt += 1
        n //= i
    ans += bisect_right(data,cnt)
    if n == 1:
        break
else:
    ans += 1
print(ans)
# Judge status: Wrong Answer
a=list(input().split())
x=int(a[0])
y=float(a[1])
print(int(x*y))
# Judge status: Wrong Answer
n = int(input())
list_w = [input() for s in range(0, n)]
for i in range(0, n):
    if i == 0 or (list_w[i][-1] == list_w[i][0] and list_w[i] in list_w[:i]):
        continue
    else:
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
s = list(input())
t = list(input())
if s==t:
    print('No')
    exit()

s = sorted(s)
s = ''.join(s)
t = sorted(t, reverse=1)
t = ''.join(t)
l = [s,t]
k = sorted(l)
if l==k:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

num1, num2, num4 = 0, 0, 0
for i in a:
    if i % 4 == 0:
        num4 += 1
    elif i % 2 == 0:
        num2 += 1
    else:
        num1 += 1

if num1 <= num4:
    print('Yes')
elif num1 == num4 + 1 and num2 == 0:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
D,T,S = map(int, input().split())
if T*S>=D:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n = int(input())
a = [int(x) for x in input().split()]
cnt = 0
for a0 in a[::1]:
    if a0%2 == 1:
        cnt += 1
print(cnt)
# Judge status: Accepted
n,*a=map(int,open(0).read().split())
b=[0]*n
for i in range(1,n+1)[::-1]:
  if not sum(b[i-1::i])%2==a[i-1]:
    b[i-1]=1
print(sum(b))
print(*[i+1 for i,b_i in enumerate(b) if b_i==1])
# Judge status: Wrong Answer
def resolve():
    N = int(input())
    A = list(map(int, input().split()))

    A.sort(reverse=True)
    ans = sum(A) - min(A)

    if (A[0] > 1 and A[0] == A[1]):
        ans += A[0] - A[-2]

    print(ans)

resolve()
# Judge status: Accepted
n,k=map(int,input().split())
h_list=[int(i) for i in input().split()]

h_list.sort()
print(sum(h_list[:n-k]) if n>k else 0)
# Judge status: Accepted
n,m=map(int,input().split())
quant=[1]*(n+1)
prob=[0]*(n+1)
prob[1]=1
for i in range(m):
    x,y=map(int,input().split())
    quant[x]-=1
    quant[y]+=1
    if prob[x]>0:
        prob[y]+=1
    if quant[x]==0:
        prob[x]=0

cnt=0
for i in range(n+1):
    if prob[i]>0:
        cnt+=1
print(cnt)
# Judge status: Accepted
N, A, B = map(int, input().split())
nums = []
for i in range(1,N+1):
    I = str(i)
    s = 0
    for j in range(len(I)):
        s += int(I[j])
    if s >= A and s <= B:
        nums.append(i)
print(sum(nums))
# Judge status: Accepted
L = int(input())

ans = L**3 / 27

print(ans)
# Judge status: Accepted
n, k = map(int, input().split())
h = [i for i in map(int, input().split())]
c = n - k
if c>0:
    h.sort(reverse=True)
    h = h[-c:]
    print(sum(h))
else:
    print(0)
# Judge status: Wrong Answer
N,x=map(int,input().split())
A=list(map(int,input().split()))
A.sort()
for i in range(len(A)):
  if x-A[i]<0:
    break
  else:
    x-=A[i]
print(i)