Harryxun/stf_run huggingface dataset:
S = input()
if len(S) < 26:
    for c in string.ascii_lowercase:
        if c not in S:
            break
    print(S + c)
else:
    ret = None
    for i in range(26):
        if max(S[25-i:]) != S[25-i]:
            mc = 'z'
            for c in S[25-i:]:
                if c > S[25-i]:
                    mc = min(c, mc)
            ret = S[:25-i] + mc
            break
            
    if ret is None:
        print(-1)
    else:
        print(ret)

### FIXED CODE ###

import string
 
S = input()
if len(S) < 26:
    for c in string.ascii_lowercase:
        if c not in S:
            break
    print(S + c)
else:
    ret = None
    for i in range(26):
        if max(S[25-i:]) != S[25-i]:
            mc = 'z'
            for c in S[25-i:]:
                if c > S[25-i]:
                    mc = min(c, mc)
            ret = S[:25-i] + mc
            break
            
    if ret is None:
        print(-1)
    else:
        print(ret)
N = int(input())
S = input()
s = [S[i: i + 1] for i in range(N)]
preans = 0
pew = 0
bflag = 0
b2w = 0
for i, word in enumerate(s):
    if bflag == 0:
        if word == '#':
            bflag = 1
    else:
        if word == '.':
            b2w = 1
    if b2w == 1:
        if word == '.':
            preans += 1
skip = 1
ans2 = 0
wcount = 0
bcount = 0
for i, word in enumerate(s):
    if b2w > skip:
        ans = min(preans, preans + bcount - wcount)
        preans = preans + bcount - wcount
        skip += 1
        wcount = 0
        bcount = 0

    if word == '#':
        bcount += 1

    if bflag == 0:
        if word == '#':
            bflag = 1
    else:
        if word == '.':
            b2w += 1
            bflag = 0

    if b2w == skip and word == '.':
        wcount += 1
print(ans)


### FIXED CODE ###

N = int(input())
S = input()
s = [S[i: i + 1] for i in range(N)]
bcount = 0
wcount = 0
for word in s:
    if word == '.':
        wcount += 1
ans = wcount
preans = ans
for word in s:
    if word == '#':
        preans += 1
    else:
        preans -= 1
    ans = min(ans, preans)
print(ans)
from collections import defaultdict

MOD = 1000000007

n = int(input())
alst = list(map(int, input().split()))
dic = defaultdict(list)
for i in range(n + 1):
    dic[alst[i]].append(i)

for v in dic.values():
    if len(v) == 2:
        left, right = v
        break

factMem = {}
def fact(x):
    if x <= 0:return 1
    if x in factMem:return factMem[x]
    factMem[x] = x * fact(x - 1) % MOD
    return factMem[x]

inverseMem = {}
def inverse(x):
    if x in inverseMem:return inverseMem[x]
    inverseMem[x] = pow(x, MOD - 2, MOD)
    return inverseMem[x]

def comb(x, y):
    if x < y:return 0
    return (fact(x) * inverse(fact(y)) * inverse(fact(x - y))) % MOD

for i in range(n + 1):
    print(comb(n + 1, i + 1) - comb(n - right + left, i))


### FIXED CODE ###

from collections import defaultdict

MOD = 1000000007

n = int(input())
alst = list(map(int, input().split()))
dic = defaultdict(list)
for i in range(n + 1):
    dic[alst[i]].append(i)

for v in dic.values():
    if len(v) == 2:
        left, right = v
        break

rem = n + 1 - (right - left + 1)


factMem = {}
def fact(x):
    if x <= 0:return 1
    if x in factMem:return factMem[x]
    factMem[x] = x * fact(x - 1) % MOD
    return factMem[x]

for x in range(n + 1):
    fact(x)

inverseMem = {}
def inverse(x):
    if x in inverseMem:return inverseMem[x]
    inverseMem[x] = pow(x, MOD - 2, MOD)
    return inverseMem[x]

def comb(x, y):
    if x < y or y < 0:return 0
    return (fact(x) * inverse(fact(y)) * inverse(fact(x - y))) % MOD

for i in range(n + 1):
    print((comb(n + 1, i + 1) - comb(rem, i)) % MOD)
n=int(input())
a=sorted(map(int,input()))
print(a[:-1]-a[0])

### FIXED CODE ###

n=int(input())
a=sorted(map(int,input().split()))
print(a[-1]-a[0])
num = input()

result = 0

if len(num) != 1:
  result = int((len(num)-2)//2 * ("90") + "9")

if len(num) % 2 == 0:
  print(result)
else:
  AAA = int("1" + (len(num) - 1) * "0") - 1
  print(result + int(num) - AAA)

### FIXED CODE ###

strList = input().split()
A, B, C = [int(s) for s in strList]

if (A - B) >= C:
    print(0)
elif A - B < C:
    print(C - A + B)
A,B,K = map(int,input().split())

l = list(range(A,B+1))
if K >= len(l):
	for i in l:
		print(i)

a1 = l[:K]
a2 = l[len(l)-K:]

a3 = sorted(list(set(a1 + a2)))

for i in a3:
	print(i)

### FIXED CODE ###

A,B,K = map(int,input().split())
S = []
#list(range(A,B+1))
for i in range(K):
	S.append(A+i)
	S.append(B-i)

S = sorted(list(set(S)))

for i in range(len(S)):
	if A<=S[i]<=B:
		print(S[i])
import sys

def fibo(n):
    a, b = 0, 1
    if n == 1:
        return 1
    else:
        for i in range(n):
            a0 = a
            a = b
            b = a0 + b
        return b
        
N, M = map(int, input().split())
a = []

for i in range(M):
    a.append(int(input()))
    
for j in range(len(a)-1):
    if a[j+1] - a[j] == 1:
        print(0)
        sys.exit()
    
hole = 0
pattern = 1

for a_ in a:
    hole = a_ - hole
    pattern *= fibo(hole-1)
    hole = a_
    
pattern *= fibo(N-hole-1)

print(pattern % 1_000_000_007)

### FIXED CODE ###

import sys

mod = 10**9 + 7

def fibo(n):
    a, b = 0, 1
    if n == 1:
        return 1
    else:
        for i in range(n):
            a0 = a
            a = b
            b = a0 + b
        return b
        
N, M = map(int, input().split())
a = []
 
if M == 0:
    print(fibo(N) % mod)
    sys.exit()
 
for i in range(M):
    a.append(int(input()))
    
for j in range(len(a)-1):
    if a[j+1] - a[j] == 1:
        print(0)
        sys.exit()
    
hole = 0
pattern = 1
 
for i, k in enumerate(a):
    if i == 0:
        pattern *= fibo(k-1)
    else:
        if i > 0:
            pattern *= fibo(a[i]-a[i-1]-2)
        
pattern *= fibo(N-a[-1]-1)
print(pattern % mod)
A, B = [int(x) for x in input().split('/')]
print(A+B if (B%A == 0) else B-A)


### FIXED CODE ###

A, B = [int(x) for x in input().split()]
print(A+B if (B%A == 0) else B-A)
import math

a, b, h, m = list(map(int, input().split(" ")))

h_a = h * 30
m_a = m * 6
angle = abs(h_a - m_a)
if angle > 180:
    angle = 360 - angle

if angle == 0:
    ans = abs(a-b)
else:
    angle = angle * np.pi / 180
    ans = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(angle))

print(ans)

### FIXED CODE ###

import numpy as np
import math

a, b, h, m = list(map(int, input().split(" ")))

h_a = (h + m/60) * 30
m_a = m * 6
angle = abs(h_a - m_a)
if angle > 180:
    angle = 360 - angle

if angle == 0:
    ans = abs(a-b)
else:
    angle = angle * np.pi / 180
    ans = np.sqrt(a**2 + b**2 - 2 * a * b * np.cos(angle))

print(ans)
n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
a = sorted(a)
while len(a) > 1:
    for i in range(1:len(a)):
        if a[len(a)-1-i] % a[0] == 0:
            a.pop()
        else: a[len(a)-1-i] %= a[0]
    a = sorted(a)
print(a[0])

### FIXED CODE ###

n = int(input())
a = input().split()
for i in range(n):
    a[i] = int(a[i])
def gcm(a,b):
    if a >= b:
        if a % b == 0:
            return b 
        else:
            return gcm(b,a%b)
    else: return gcm(b,a)
for i in range(1,len(a)):
    a[0] = gcm(a[0],a[i])
print(a[0])
R,G=map(int,input().split())
  print(2*G-R)

### FIXED CODE ###

r=int(input())
g=int(input())
print(2*g-r)
N, K = map(int, input().split())

if N >= K:
    print(N % K)
else:
    print(K % N)

### FIXED CODE ###

#coding:utf-8

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

r1 = n % k
r2 = abs(k - r1)

ans = min(r1,r2)

print("{}".format(ans))
n,a,b=map(int, input().split())

def cmb(n, r, mod):
    if (r<0 or r>n):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 
N = 10**5
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

def pos(x, n, m):
    res = pos(x*x%m, n//2, m)
    if n%2 == 1:
        res = res*x%m
    return res
    
if n==2:
    print(0)
else:
    ans=pos(2,n,mod)-1-cmb(n,a,mod)-cmb(n,b,mod)
    print(ans%mod)

### FIXED CODE ###

n,a,b=map(int, input().split())
 
def comb(n, r,MOD):
    p, q = 1, 1
    for i in range(r):
        p = p * (n-i) % MOD
        q = q * (i+1) % MOD
    return p * pow(q, MOD-2, MOD) % MOD

mod=10**9+7
    
A=comb(n,a,mod)
B=comb(n,b,mod)  
C=pow(2,n,mod)

if n==2:
    print(0)
else:
    print((C-1-A-B)%mod)
a = input()
a = int(a)
 
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
 
print(l[a+1])

### FIXED CODE ###

a = input()
a = int(a)
 
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
 
print(l[a-1])
def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : Pcount += 1
    if Pcount > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])

### FIXED CODE ###

def ascend(a,b):
    mini = min(A[a:a+L])
    ans[a] = mini
    for i in range(a+1,b):
        if A[i+L-1] <= mini : mini = A[i+L-1]
        elif A[i-1] == mini : mini = min(A[i:i+L])
        ans[i] = mini

def descend(a,b):
    mini = min(A[b-1:b+L-1])
    ans[b-1] = mini
    for i in range(b-2,a-1,-1):
        if A[i] <= mini : mini = A[i]
        elif A[i+L] == mini: mini = min(A[i:i+L])
        ans[i] = mini
    
[N,L] = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
ans = [None]*(N-L+1)
count = 0;
if N > 10 ** 4:
    for i in range(100):
        if A[i+1] > A[i] : count += 1
    if count > 80 : descend(0, N-L+1)
    else : ascend(0,N-L+1)
else :
    ascend(0, N-L+1)
for i in ans[:-1] : print(i, end=" ")
print(ans[-1])
import sys

readline = sys.stdin.readline

def main():
    N, M = map(int, readline().split())
    n = []
    for _ in range(N):
        n.append(list(readline()[:-1]))
    m = []
    for _ in range(M):
        m.append(list(readline()[:-1]))

    s = N - M
    for i in range(s):
        for j in range(s):
            flag = True
            for k in range(M):
                if n[i+k][j:j+M] != m[k]:
                    flag = False
                    break
            if flag:
                break
        if flag:
            break
    if flag:
        print('Yes')
    else:
        print('No')
            
if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys

readline = sys.stdin.readline

def main():
    N, M = map(int, readline().split())
    n = []
    for _ in range(N):
        n.append(list(readline()[:-1]))
    m = []
    for _ in range(M):
        m.append(list(readline()[:-1]))

    s = N - M
    if s == 0:
        if n == m:
            flag = True
        else:
            flag = False

    for i in range(s):
        for j in range(s):
            flag = True
            for k in range(M):
                if n[i+k][j:j+M] != m[k]:
                    flag = False
                    break
            if flag:
                break
        if flag:
            break
    if flag:
        print('Yes')
    else:
        print('No')
            
if __name__ == "__main__":
    main()
n,m = input().split()
k = int(n)
l = list(input().split())

for i in range(k,100000):
    for x in l:
        for y str(i):
            break
    else:
        print(i)
        break


### FIXED CODE ###

n,m = input().split()
k=int(n)
li = list(input().split())

for i in range(k,100000):
    for e in li:
        if e in str(i):
            break
    else:
        print(i)
        break
S = input()
count = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count += 1

if count == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)


### FIXED CODE ###

S = input()
count = 0
exception = [0]
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"

print(answer)
import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(100000))

print(primes[list(np.array(primes) > X).index(True)])

### FIXED CODE ###

import numpy as np

X = int(input())

def get_primes(n):
    numbers = set(range(n, 1, -1))
    primes = []
    while numbers:
        p = numbers.pop()
        primes.append(p)
        numbers.difference_update(set(range(p*2, n+1, p)))
    return primes

primes = sorted(get_primes(110000))

print(primes[list(np.array(primes) >= X).index(True)])
N = int(input())
S = input()

E = [0]*(N+2)
W = [0]*(N+2)
for i in range(1,N+1):
    if S[i-1] == 'E':
        E[i] = E[i-1] + 1
        W[i] = W[i-1]
    else:
        W[i] = W[i-1] + 1
        E[i] = E[i-1]
#print(E)
#print(W)
ans = N
for l in range(1,N+2):
    num = E[N]-E[l+1]
    num += W[l-1]-W[0]
    if ans >= num:
        ans = num

print(ans)

### FIXED CODE ###

N = int(input())
S = input()

E = [0]*(N+2)
W = [0]*(N+2)
for i in range(1,N+1):
    if S[i-1] == 'E':
        E[i] = E[i-1] + 1
        W[i] = W[i-1]
    else:
        W[i] = W[i-1] + 1
        E[i] = E[i-1]

ans = 300000
for L in range(1,N+1):
    num = E[N] - E[L] + W[L-1] -W[0]
    if ans > num:
        ans = num

print(ans)
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
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 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 = float('inf')
mod = 10 ** 9 + 7

n, k, s = MAP()

# A = [i for i in range(1, s+1)]
# print(A)
# add = []
# A = [i for i in range(1, 10**9+1)]
# for i in range(1, n+1):
#   for j in range(i, n+1):

L = [ s ] * k
c = n-len(L)
# print(c)
L[0] = L[0] - c
for i in range(c):  
  L.insert(0, 1)
  
# print(L)

#ans = [1, 2, 3, 4]
print(*L)

### FIXED CODE ###

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
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 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 = float('inf')
mod = 10 ** 9 + 7

n, k, s = MAP()
 
if s == 10 ** 9:
  a = 1
else:
  a = 10 ** 9

ans = [s] * k + [a] * (n - k)
 
print(*ans)
N=int(input())
X=list(map(int, input().split()))
x=[]
for i in range (N):
    x.append(X[:i] +X[i+1:])
for i in range (N):
    x[i].sort()
    print(x[i][median])

### FIXED CODE ###

N=int(input())
X=list(map(int, input().split()))
 
import copy
X_sort=copy.deepcopy(X)
X_sort.sort()
X_sort
 
median_control=(X_sort[N//2-1]+X_sort[N//2])/2
for i in range (N):
    if X[i]>median_control:
        print (X_sort[N//2-1])
    if X[i]<=median_control:
        print (X_sort[N//2])
import numpy as np
import math

X, Y = list(map(int, input().strip().split()))

mod = 10**9+7
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

if X>0 and Y>0 and (2*X - Y)%3 == 0 and (2*Y - X)% 3==0 and 2*Y >= X and Y <= 2*X: 
    m = int((2*X - Y)/ 3)
    n = int((2*Y - X)/ 3)
    
    for i in range( 2, m+n + 1 ):
        g1.append( ( g1[-1] * i ) % mod )
        inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
        g2.append( (g2[-1] * inverse[-1]) % mod )
    
    
    ret = cmb(m+n, m, mod)
print(ret)

### FIXED CODE ###

X, Y = list(map(int, input().strip().split()))

mod = 10**9+7

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

if X>0 and Y>0 and (2*X - Y)%3 == 0 and (2*Y - X)% 3==0 and 2*Y >= X and Y <= 2*X: 
    m = int((2*X - Y)/ 3)
    n = int((2*Y - X)/ 3)
    
    g1 = [1, 1] # 元テーブル
    g2 = [1, 1] #逆元テーブル
    inverse = [0, 1] #逆元テーブル計算用テーブル
    for i in range( 2, m+n + 1 ):
        g1.append( ( g1[-1] * i ) % mod )
        inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
        g2.append( (g2[-1] * inverse[-1]) % mod )
    ret = cmb(m+n, m, mod)
else:
    ret = 0
print(ret)
x = int(input())
y = list(map(int, input().split()))

y.sort()
ans = [bool(a+1) for a in range(x)]

for i in range(x-1):
    if ans[i] == True:
        if y[i] == y[i+1]:
            ans[i] = False
        for j in range(i+1 ,x):
            if (ans[j] == True) and (y[j]%y[i]==0):
                ans[j] = False

print(sum(ans))

### FIXED CODE ###

x = list(map(int, input().split()))

for i, j in enumerate(x, 1):
    if i != j:
        print(i)
a=int(input())
b=int(input())
c=a-1
d=b-1
print(c*d)

### FIXED CODE ###

a,b=map(int,input().split())
print((a-1)*(b-1))
K = int(input())
X = int(input())
K = K *2
if K >= X:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

k,x = [int(x) for x in input().split()]

k = k * 500 

if k >= x:
  print("Yes")
else:
	print("No")
n,k = map(int,input().split())

pi = [0 for _ in range(n)]
si = [0 for _ in range(n)]

pi = [int(s) for s in input().split()]
pi = [(1+s)/2 for s in pi]

si[0] = pi[0]
for i in range(1,n):
    si[i] = si[i-1] + pi[i]

#print(pi)
#print(si)
#print(si[2]-si[0])

ans = 0
for i in range(n-k+1):
    ans = max(si[i+k]-si[i],ans)

print(float(ans))

### FIXED CODE ###

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

pi = [0 for _ in range(n)]
si = [0 for _ in range(n)]

pi = [int(s) for s in input().split()]
pi = [(1+s)/2 for s in pi]

si[0] = pi[0]
for i in range(1,n):
    si[i] = si[i-1] + pi[i]

#print(pi)
#print(si)
#print(si[2]-si[0])

ans = 0
if not (n==k):
    for i in range(n-k):
        ans = max(si[i+k]-si[i],ans)
else:
    ans = si[n-1]

print(float(ans))
from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin().readline().split())
    dat = map(int, stdin.read().split(), repeat(10, 2 * m))
    c = [0] * (n + 1)
    for x in dat:
        c[x] += 1
    for i in xrange(n + 1):
        if c[i] == 1:
            print "NO"
            return
    print "YES"
main()
from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin().readline().split())
    dat = map(int, stdin.read().split(), repeat(10, 2 * m))
    c = [0] * (n + 1)
    for x in dat:
        c[x] += 1
    for i in xrange(n + 1):
        if c[i] == 1:
            print "NO"
            return
    print "YES"
main()


### FIXED CODE ###

from sys import stdin
from itertools import repeat
def main():
    n, m = map(int, stdin.readline().split())
    dat = map(int, stdin.read().split(), repeat(10, 2 * m))
    c = [0] * (n + 1)
    for x in dat:
        c[x] += 1
    f = 0
    for i in xrange(n + 1):
        if c[i] & 1:
            print "NO"
            return
    print "YES"
main()
N = int(input())

def factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def make_divisors(n: int):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    return divisors



facts = factorize(N)
fs = set(facts)

from collections import Counter
fc = Counter(facts)
# divisiors = make_divisors(N)
fms = max([v for k,v in fc.items()])
fm = max(max(facts), fms) 
ans = 0

# print(facts)
# print(divisiors)

# for d in divisiors:
#     if d

for f in fs:
    i = 1
    for j in range(fm):
        if N % f == 0:
            x = f * i
            if N % x == 0:
                ans += 1
                N //= x
            i += 1
        else:
            break

print(ans)


### FIXED CODE ###

N = int(input())

def factorize(n):
     a = []
     # 2で割り切れるまでnを割り続ける
     while n % 2 == 0:
         a.append(2)
         n //= 2
     f = 3
     # 3からはじめて各奇数で割り切れるまでnを割り続ける
     # nの最大約数は√nなので、f*fで計算
     while f * f <= n:
         if n % f == 0:
             a.append(f)
             n //= f
         else:
             f += 2
     if n != 1:
         a.append(n)
     return a
    
fs = factorize(N)

from collections import Counter
fc = Counter(fs)

ans = 0
i = 1
for k, v in fc.items():
    # print(k, v)
    k2, v2 = k,v
    while v2 >= i:
        # print(k, v, i)
        ans += 1
        v2 -= i  
        i += 1
    i = 1

print(ans)