Harryxun/stf_run huggingface dataset:
N,Y = map(int,input().split())
ans = "-1 -1 -1"
for i in range(1,N+1):
  for j in range(1,N+1):
    k = N-i-j
    if i*10000 + j*5000 + k*1000 == Y:
      ans=(i + " " + j + " " + k)
      break
    else:
      continue
print(ans)


### FIXED CODE ###

N,Y = map(int,input().split())
for i in range(N+1):
  for j in range(N-i+1):
    k = N-i-j
    if i*10000 + j*5000 + k*1000 == Y:
      print(i,j,k)
      exit()
print("-1 -1 -1")
import numpy as np

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

v = a*a*b

if v == x:
    print(0)
    exit(0)

h = (2*x)/(a*a)

t = np.arctan(h/a)

print(t*180/np.pi)




### FIXED CODE ###

import numpy as np

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

v = a*a*b

if v == x:
    print(0)
    exit(0)

t = None
if x >= v/2:
    pad = a*a*b - x
    h = (2*pad)/(a*a)
    t = np.arctan(h/a)
else:
    w = (2*x)/(a*b)
    t = np.arctan(b/w)
print(t*180/np.pi)
N, W = map(int, input().split())
w0, v0 = map(int, input().split())
X = [[] for _ in range(4)]
X[0].append(v0)
for _ in range(N-1):
    w, v = map(int, input().split())
    X[w-w0].append(v)

X = [[0] + sorted(x)[::-1] for x in X]
for i in range(4):
    for j in range(1, len(X[i])):
        X[i][j] += X[i][j-1]
ma = 0
for i in range(N+1):
    for j in range(N+1-i):
        for k in range(N+1-i-j):
            l = min(N-i-j-k, (W - (w0 * i + (w0+1) * j + (w0+2) * k)) // (w0+3))
            if l < 0: continue
            if i < len(X[0]) and j < len(X[1]) and k < len(X[2]) and l < len(X[3]):
                ma = max(ma, X[0][i] + X[1][j] + X[2][k] + X[3][l])
print(ma)

### FIXED CODE ###

from itertools import accumulate as ac
t = 3099044504245996706400 # LCM(1..50)
N, A, B = map(int, input().split())
V = sorted([int(a) * t for a in input().split()])[::-1]
l, r = 0, 1<<200
while r - l > 1:
    m = (l+r) // 2
    if list(ac([v-m for v in V]))[A-1] >= 0:
        l = m
    else:
        r = m

fa = [1]
for i in range(1, 60):
    fa.append(fa[-1] * i)
C = lambda a, b: fa[a] // (fa[a-b] * fa[b])

print(l/t)
print(sum([C(V.count(V[i-1]), V[:i].count(V[i-1])) for i in range(A, B+1) if sum(V[:i]) == l * i]))
import numpy as np

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

ans = []

judge_h = []

for i in range(H):
    tmp = list(map(str, input().rstrip()))
    ans.append(tmp)
    if tmp.count("#")==0:
        judge_h.append(False)
    else:
        judge_h.append(True)

ans = np.array(ans)

judge_w = []

for i in range(W):
    if np.where(ans[:, i]=="#")[0].shape[0]==0:
        judge_w.append(False)
    else:
        judge_w.append(True)

ans = ans[judge_h, :]
ans = ans[:, judge_w]
ans = [list(i) for i in ans]

for i in range(len(ans)):
    print("".join(ans[i]))

### FIXED CODE ###

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

a = []

# 必要な行だけ読み込む
for i in range(H):
    tmp = list(input())
    if "#" not in tmp:
        continue
    else:
        a.append(tmp)

# 転置して削って転置
a = list(zip(*a))
a = [x for x in a if "#" in x]
a = list(zip(*a))

for i in a:
    print("".join(i))
a=sorted([int(i) for i in input().split()],reverse=True)
print(",".join(a))

### FIXED CODE ###

print(*sorted([int(i) for i in input().split()],reverse=True))
n,m=map(int, input().split())
r = []

for i in range(n):
    r.append(str(0))

if n != 1 and m == 0:
    print('-1')
    exit()

for i in range(m):
    s,c = map(int, input().split())
    if n == 1 and r[0] == '0':
        print('0')
        exit()
    elif n > 1 and s == 1 and c == 0:
        print('-1')
        exit()

    if int(r[s-1]) == 0:
        r[s-1] = str(c)
    elif int(r[s-1]) == c:
        r[s-1] = str(c)
    else:
        print('-1')
        exit()

if n > 1 and r[0] == '0':
    r[0] = 1
    print(''.join(r))
else:
    print(''.join(r))



### FIXED CODE ###

n,m=map(int, input().split())
r = []

for i in range(n):
    r.append(str(0))

if n == 1 and m == 0:
    print('0')
    exit()
if n == 2 and m == 0:
    print('10')
    exit()
if n == 3 and m == 0:
    print('100')
    exit()

for i in range(m):
    s,c = map(int, input().split())
    if n == 1 and s == 1 and c == 0:
        print('0')
        exit()
    elif n > 1 and s == 1 and c == 0:
        print('-1')
        exit()

    if int(r[s-1]) == 0:
        r[s-1] = str(c)
    elif int(r[s-1]) == c:
        r[s-1] = str(c)
    else:
        print('-1')
        exit()

if n > 1 and r[0] == '0':
    r[0] = '1'
    print(''.join(r))
else:
    print(''.join(r))
N = int(input())
lis_X = list(map(int, input().split()))

lis_X_sorted = sorted(lis_X)

def calc_dif_sq(x,p):
    return (x-p)**2

res = []
for p in range(lis_X_sorted[0],lis_X_sorted[-1]):
    tmp = sum(map(lambda x:calc_dif_sq(x, p), lis_X_sorted))
    res.append(tmp)
ans = min(res)
print(ans)

### FIXED CODE ###

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

lis_X_sorted = sorted(lis_X)

def calc_dif_sq(a,b):
    return (a-b)**2

if N == 1:
    ans = 0
elif min(lis_X_sorted)==max(lis_X_sorted):
    ans = 0
else :
    res = []
    for p in range(lis_X_sorted[0],lis_X_sorted[-1]):
        tmp = sum(list(map(lambda x:calc_dif_sq(x, p), lis_X_sorted)))
        res.append(tmp)
    ans = min(res)
print(ans)
l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
ans += min(ll)
print(ans)

### FIXED CODE ###

l = [int(input()) for i in range(5)]
ll = []
ans = -10
for i in range(5):
    if l[i] % 10 ==0:
        ans += l[i]
    else:
        ll.append(l[i]%10)
        ans += (l[i]//10 + 1)*10
if ll == []:
    ans += 10
else:
    ans += min(ll)
print(ans)
if a>=13:
  print(b)
if a>=6 and a<=12:
  print(b//2)
if a<=5:
  print(0)

### FIXED CODE ###

a,b=map(int,input().split())
if a>=13:
  print(b)
if a>=6 and a<=12:
  print(b//2)
if a<=5:
  print(0)
n=int(input())%10

if n == 3:
    print("bon")
elif n==0 or n==1 or n == 6 or n==8:
    print("pon")
else:
    prinh("hon")

### FIXED CODE ###

n=int(input())%10

if n == 3:
    print("bon")
elif n==0 or n==1 or n == 6 or n==8:
    print("pon")
else:
    print("hon")
n,Z,W=map(int,input().split())
a=list(map(int,input().split()))
res = max(abs(a[-1]-W),abs(a[-1]-a[-2]))
print(res)

### FIXED CODE ###

n,Z,W=map(int,input().split())
a=list(map(int,input().split()))
res = abs(a[-1]-W)
if len(a) > 1:
    res = max(res,abs(a[-1]-a[-2]))
print(res)
K,X=map(int,input().split())
ans=YES
if 500*K<X:
    ans=NO
print(ans)


### FIXED CODE ###

k, x = map(int, input().split())
if x <= k*500:
    print('Yes')
else:
    print('No')
nCr = {}
def combination(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = combination(n-1,r) + combination(n-1,r-1)
    return nCr[(n,r)]

N, K = map(int, input().split())
for i in range(1, K+1):
	if i <= N-K+1:
		A = combination(N-K+1, i)
		P = combination(K-1, i-1)
		B = A * P
		print(B % (10**9+7))
	else:
		print(0)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

nCr = {}
def combination(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = combination(n-1,r) + combination(n-1,r-1)
    return nCr[(n,r)]

N, K = map(int, input().split())
for i in range(1, K+1):
	if i <= N-K+1:
		A = combination(N-K+1, i)
		P = combination(K-1, i-1)
		B = A * P
		print(B % (10**9+7))
	else:
		print(0)
from sys import setrecursionlimit

setrecursionlimit(10**10)

def dfs(v):
    flag = True

    for nxt in edge[v]:
        if l[v] == l[nxt]:
            return False
        elif l[v] + l[nxt] == 1:
            continue
        else:
            l[nxt] = 1 - l[v]
            cnt[1-l[v]] += 1
            flag &= dfs(nxt)
    
    return flag
        

n, m = map(int, input().split())
edge = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    edge[a-1].append(b-1)
    edge[b-1].append(a-1)

l = [-1] * n
l[0] = 0
cnt = [1, 0]

if dfs(0):
    print(cnt[0] * cnt[1] - m)
else:
    print(n * (n - 1) // 2 - m)

### FIXED CODE ###

from sys import setrecursionlimit

setrecursionlimit(10**6)

def dfs(v):
    flag = True

    for nxt in edge[v]:
        if l[v] == l[nxt]:
            return False
        elif l[v] + l[nxt] == 1:
            continue
        else:
            l[nxt] = 1 - l[v]
            cnt[1-l[v]] += 1
            flag &= dfs(nxt)
    
    return flag
        

n, m = map(int, input().split())
edge = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    edge[a-1].append(b-1)
    edge[b-1].append(a-1)

l = [-1] * n
l[0] = 0
cnt = [1, 0]

if dfs(0):
    print(cnt[0] * cnt[1] - m)
else:
    print(n * (n - 1) // 2 - m)
n = int(input())
s = input().split()
count = 0
for i in range(n-1):
    if s[i] == '1':
        count += 1
print(count)
for i in range(n-1):
    count = 0
    num = i + 2
    for j in range(i+1,n-1):
        NUM = int(s[j])
        if NUM == num:
            count += 1
    print(count)


### FIXED CODE ###

import math as mt
r = int(input())
R = 2*r*mt.pi
print(R)
import math
import sys
from copy import copy
import numpy as np
from collections import defaultdict, deque, Counter 
from itertools import accumulate, product, permutations,combinations, combinations_with_replacement
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd

max_value = 1000000000
min_value = -1000000000
sys.setrecursionlimit(max_value)

n = int(input())
s = list(input())

count = 0


if s[0] == 'W' or s[-1] == 'W':
    print(0)
    sys.exit()

LR_list = ['' for i in range(2*n)]
LR_list[0] = 'L'

for i in range(1,len(LR_list)):
    if s[i] == s[i-1]:
        if LR_list[i-1] == 'R':
            LR_list[i] = 'L'
        else:
            LR_list[i] = 'R'
    else:
        if LR_list[i-1] == 'R':
            LR_list[i] = 'R'
        else:
            LR_list[i] = 'L'

values = []

if LR_list.count('L') != LR_list.count('R'):
    print(0)
    sys.exit()
for i in range(len(LR_list)):
    if LR_list[i] == 'R':
        li = LR_list[:i].count('L')
        ri = LR_list[:i].count('R')
        values.append(li-ri)
print(np.array(values).prod()*math.factorial(n))



### FIXED CODE ###

import math
import sys
import numpy as np
from collections import defaultdict, deque, Counter 
from itertools import accumulate, product, permutations,combinations, combinations_with_replacement
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd

max_value = 1000000000
min_value = -1000000000
sys.setrecursionlimit(max_value)

m, d = map(int,input().split())

count = 0
for i in range(1,m+1):
    for j in range(10,d+1):
        first_d = int(str(j)[1])
        second_d = int(str(j)[0])
        if i == first_d * second_d and first_d >= 2 and second_d >= 2:
            count += 1

print(count)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    a, b = map(int, input().split())
    print(a * b)
    

if __name__ == '__main__':
    main()
                                          ￿

### FIXED CODE ###

#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    a, b = map(int, input().split())
    print(a * b)
    

if __name__ == '__main__':
    main()
# ABC121 D - XOR World
from math import log2,ceil
a,b=map(int,input().split())
if a==0:
    pass
elif a>=2:
    na=int(ceil(log2(a)))
nb=int(ceil(log2(b)))
l=[0]*(nb+1)

if a>=2:
    a-=1
    for i in range(na+1):
        q=a//(2**(i+1))
        r=a%(2**(i+1))
        r-=2**i
        if r<0:
            r=0
        elif r>=0:
            r+=1
        l[i]-=q*2**i+r

for i in range(nb+1):
    q=b//(2**(i+1))
    r=b%(2**(i+1))
    r-=2**i
    if r<0:
        r=0
    elif r>=0:
        r+=1
    l[i]+=q*2**i+r

for i in range(len(l)):
    l[i]=l[i]%2

ans=0
for i in range(len(l)):
    ans+=l[i]*2**i
print(ans)

### FIXED CODE ###

# ABC121 D - XOR World
from math import log2,ceil
a,b=map(int,input().split())
if a==0 and b==0:
    print(0)
    exit()
if a==0:
    pass
elif a>=2:
    na=int(ceil(log2(a)))
nb=int(ceil(log2(b)))
l=[0]*(nb+1)

if a>=2:
    a-=1
    for i in range(na+1):
        q=a//(2**(i+1))
        r=a%(2**(i+1))
        r-=2**i
        if r<0:
            r=0
        elif r>=0:
            r+=1
        l[i]-=q*2**i+r

for i in range(nb+1):
    q=b//(2**(i+1))
    r=b%(2**(i+1))
    r-=2**i
    if r<0:
        r=0
    elif r>=0:
        r+=1
    l[i]+=q*2**i+r

for i in range(len(l)):
    l[i]=l[i]%2

ans=0
for i in range(len(l)):
    ans+=l[i]*2**i
print(ans)
import sys
import math
from collections import Counter
import itertools
import fractions
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

A,B,H,M=MI()



kakuM = M*6
kakuH = H*30+0.5*M




kakudo = kakuH - kakuM
if kakudo > 180:
    kakudo -= 180

if kakudo == 180:
    print(int(A+B))
    exit()
if kakudo == 0:
    print(0.000000000000)
    exit()

ans = A**2 + B**2 - 2 * A * B * Decimal.cos(math.radians(kakudo))

print(Decimal(ans).sqrt())


### FIXED CODE ###

import sys
import math
from collections import Counter
import itertools
import fractions
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

A,B,H,M=MI()



kakuM = M*6
kakuH = (H+M/60)*30 - kakuM


ans = A**2 + B**2 - 2 * A * B * math.cos(math.radians(kakuH))

print(Decimal(ans).sqrt())
a = int(input())
a = list(map(int,input().split()))
a,b = map(int,input().split())

### FIXED CODE ###

a,b,t = map(int,input().split())
print(int(((t+0.5)//a)*b))
h, w = map(int,input().split())
pic = []

kabe_up_down = []
for i in range(w):
    kabe_up_down.append('.')

pic.append(kabe_up_down)
for i in range(h):
    onelist = ['.']
    inp = list(str(input()))
    for i in range(len(inp)):
        onelist.append(inp[i])
    onelist.append('.')
    pic.append(onelist)
pic.append(kabe_up_down)    
flag = 1
a = 'a'
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here =='#' and pic[i+1][j] == '#':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='#' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a
            
for i in range(h+1):
    for j in range(w+1):
        if pic[i][j] == '#':
            flag = 0
            break
        
if flag == 0:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

h, w = map(int,input().split())
pic = []

kabe_up_down = []
for i in range(w+2):
    kabe_up_down.append('.')
pic.append(kabe_up_down)

for i in range(h):
    onelist = ['.']
    inp = list(str(input()))
    for mm in range(len(inp)):
        onelist.append(inp[mm])
    onelist.append('.')
    pic.append(onelist)
    
pic.append(kabe_up_down)    


flag = 1
a = 'a'
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here =='#' and pic[i+1][j] == '#':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='#' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='#' and pic[i-1][j] == '#':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='#' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a    
            
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here == '#' and pic[i+1][j] == 'a':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='#' and pic[i][j+1] == 'a':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='#' and pic[i-1][j] == 'a':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='#' and pic[i][j+1] == 'a':
            pic[i][j] = a
            pic[i][j+1] = a    
        
for i in range(1,h+1):
    for j in range(1,w+1):
        here = pic[i][j]
        if here == a and pic[i+1][j] == '#':
            pic[i][j] = a
            pic[i+1][j] = a
        elif here =='a' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a
        elif here =='a' and pic[i-1][j] == '#':
            pic[i][j] = a
            pic[i-1][j] = a
        elif here =='a' and pic[i][j+1] == '#':
            pic[i][j] = a
            pic[i][j+1] = a            
            
for i in range(1,h+1):
    for j in range(1,w+1):
        if pic[i][j] == '#':
            flag = 0
            

if flag == 0:
    print('No')
else:
    print('Yes')
N=int(input())
B = list(map(int,input().split()))
A =0

if N==2:
    print(2*B[0])
    exit()

for i in range(N-1):
    if i ==0:
        A += min(B[i],B[i+1])
    elif 2<=i<N-2:
        A += min(B[i-1],B[i],B[i+1])
    else:
        A += min(B[i-1],B[i])

A += B[N-2]
print(A)

### FIXED CODE ###

N = int(input())
print(N*N*N)
from collections import deque


def resolve():
    n, m = map(int, input().split())
    ans = [-1 for i in range(n)]

    connections = [[] for i in range(n)]
    for i in range(m):
        a, b = map(int, input().split())
        connections[a-1].append(b-1)
        connections[b-1].append(a-1)

    # stack = []
    # connected_to_one = [*connections[0]]

    # for room in connected_to_one:
    #     ans[room] = 1

    #     connections[0].remove(room)
    #     connections[room].remove(0)

    #     stack.append(room)

    D = deque([0])
    visited = [False]*n
    visited[0] = True

    while D:
        room = D.popleft()

        for i in connections[room]:
            if visited[i]:
                continue
            visited[i] = True
            ans[i] = room + 1
            D.append(i)

    _ans = ans[1:]

    if -1 in _ans:
        print('No')
    else:
        print('Yes')
        for i in _ans:
          
resolve()

### FIXED CODE ###

def resolve():
    a = int(input()[-1])
    hon = [2, 4, 5, 7, 9]
    pon = [0, 1, 6, 8]
    bon = [3]

    for _hon in hon:
        if a == _hon:
            print('hon')
    for _pon in pon:
        if a == _pon:
            print('pon')

    for _bon in bon:
        if a == _bon:
            print('bon')
resolve()
n = int(input())
a = int(input())
print('Yes' if n % 500 % a == 0 else 'No')

### FIXED CODE ###

n = int(input())
a = int(input())
print('Yes' if (n % 500) <= a else 'No')
mport math
 
a,b,c = map(int,input().split())
 
if c > a+b+2*math.sqrt(a*b):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import math

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

if c-a-b>0 and 4*a*b < (c-a-b)*(c-a-b):
  print("Yes")
else:
  print("No")
N,K = map(int,input().split())
A = list(map(int,input().split()))
def gcd(a,b):
    return a if b==0 else gcd(b,a%b)
g = gcd(A[0],A[1])
for i in range(2,N):
    g = gcd(g,A[i])
if K % g == 0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")

### FIXED CODE ###

import sys
sys.setrecursionlimit(2000000)
N,K = map(int,input().split())
A = list(map(int,input().split()))
def gcd(a,b):
    return a if b==0 else gcd(b,a%b)
if N ==1:
    g = A[0]
else:
    g = gcd(A[0],A[1])
    if N > 2:
        for i in range(2,N):
            g = gcd(g,A[i])
if K <= max(A) and K%g==0:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")
def main(n):

    prime = []
    if n < 2:
        return 1
    for p in range(2,int(n**0.5)):
        cnt = 0
        if p*p > n:
            break
        while n%p == 0:
            n //= p
            cnt += 1
        prime.append((p,cnt))
    if n > 1:
        prime.append((n,1))
    return prime
                    
n = int(input())    
pf = main(n)

ans = 0
for p, f in pf:
    cnt = 1
    while f >= cnt:
        f -= cnt
        ans += 1
        cnt += 1

print(ans)


### FIXED CODE ###

def main(n):

    prime = []
    if n < 2:
        prime.append((1,0))
    for p in range(2,int(n**0.5)):
        cnt = 0
        if p*p > n:
            break
        while n%p == 0:
            n //= p
            cnt += 1
        prime.append((p,cnt))
    if n > 1:
        prime.append((n,1))
    return prime
                    
n = int(input())    
pf = main(n)

ans = 0
for p, f in pf:
    cnt = 1
    while f >= cnt:
        f -= cnt
        ans += 1
        cnt += 1

print(ans)
import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A=list(map(int, input().split()))

    d=1
    keys=list(range(N))
    li={s:-1 for s in keys}
    li[0]=0

    pre_d=0
    while True:
        pre_d=d-1
        d=A[d-1]
        if li[d-1]==0:
            break
        li[d-1]=0

    # print(pre_d)
    # print(d)
    roop=pre_d-d+1
    print(A[(K-d)%roop+d])


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import os

def file_input():
    f = open('ABC167/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,K=map(int, input().split())
    A=list(map(int, input().split()))

    d=1
    keys=list(range(N))
    li={s:-1 for s in keys}
    li[0]=0

    roop=0
    pre_d=0
    for i in range(1,K+1):
        pre_d=d
        d=A[d-1]
        # print("i:"+str(i)+" "+str(pre_d)+"->"+str(d))
        if li[d-1]!=-1:
            roop=i-li[d-1]
            # print("detect_roop:"+str(i)+"~"+str(li[d-1]))
            break
        else:
            li[d-1]=i

    if roop!=0:
        k=1
        for j in range((K-li[d-1]-1)%roop+li[d-1]+1):
            k=A[k-1]
        print(k)
    else:
        print(d)


if __name__ == '__main__':
    main()
from fractions import gcd
n, m = map(int, input().split())
s = input()
t = input()
l = n * m // gcd(n, m)
a = [""] * l
for i in range(n):
    a[i*l//n] = s[i]
for i in range(m):
    if a[i*l//m] == "" or a[i*l//m] == t[i]:
        a[i*l//m] = t[i]
    else:
        print(-1)
        exit()
print(l)



### FIXED CODE ###

from fractions import gcd
n, m = map(int, input().split())
s = input()
t = input()
g = gcd(n,m)
l = n*m//g
for k in range(g):
    if s[k*n//g] != t[k*m//g]:
        print(-1)
        exit()
print(l)
n,m = list(map(int,input().split()));
a = list(map(int,input().split()));
 
a.sort(reverse = True);
 
i = 0;
while a[i] >= sum(a)//(4*m) and i < n:
    i += 1;
 
if i >= m :
    print('Yes');
else :
    print('No');

### FIXED CODE ###

n,m = list(map(int,input().split()));
a = list(map(int,input().split()));
 
a.sort(reverse = True);
 
i = 0;
while i<n and a[i] >= sum(a)/(4*m):
    i += 1;
 
if i >= m :
    print('Yes');
else :
    print('No');
from fractions import gcd
n = int(input())
a = [int(x) for x in input().split()]
g = a[0]
if n>1:
    for idx in range(1,len(a)):
        g = a[idx]*g//math.gcd(a[idx],g)
ans = []
for i in range(n):
    ans.append(int(g/a[i]))
print(sum(ans)%(10**9+7))

### FIXED CODE ###

from fractions import gcd
n = int(input())
a = [int(x) for x in input().split()]
g = a[0]
for i in a:
    g = i*g//gcd(i,g)
ans = 0
for i in range(n):
    ans+=int(g//a[i])
print(ans%(10**9+7))
import sys

B=[]

for line in sys.stdin:
    global B
    A=line.split()
    B=map(int,A)

D=B.sort()
e=1

while e != 0:
    e=D[1]%D[0]
    C=D[0]
    D[0]=e
    D[1]=C

print D[0]

### FIXED CODE ###

A=map(int,raw_input().split())
A.sort()

while A[1]%A[0]!=0:
    temp=A[0]
    A[0]=A[1]%A[0]
    A[1]=temp

print A[0]