AtCoder Beginner Contest 169 - Div Game

Given is a positive integer N. Consider repeatedly applying the operation below on N:
 - First, choose a positive integer z satisfying all of the conditions below:
 - z can be represented as z=p^e, where p is a prime number and e is a positive integer;
 - z divides N;
 - z is different from all integers chosen in previous operations.
 - Then, replace N with N/z.
Find the maximum number of times the operation can be applied.

-----Constraints-----
 - All values in input are integers.
 - 1 \leq N \leq 10^{12}

-----Input-----
Input is given from Standard Input in the following format:
N

-----Output-----
Print the maximum number of times the operation can be applied.

-----Sample Input-----
24

-----Sample Output-----
3

We can apply the operation three times by, for example, making the following choices:
 - Choose z=2 (=2^1). (Now we have N=12.)
 - Choose z=3 (=3^1). (Now we have N=4.)
 - Choose z=4 (=2^2). (Now we have N=1.)

Difficulty: MEDIUM

Starter code:

Solutions:
N = int(input())
(n, p, score) = (N, 2, 0)
while p ** 2 <= N:
	e = 1
	while n >= p ** e and n % p ** e == 0:
		n //= p ** e
		score += 1
		e += 1
	else:
		while n >= p and n % p == 0:
			n //= p
		p = p + 1 if p == 2 else p + 2
else:
	if n != 1:
		score += 1
print(score)


n = int(input())
n2 = int(n ** 0.5 // 1)

def div(n, p):
	cnt = 0
	a = 1
	while n % p == 0:
		n = n // p
		cnt += 1
		if cnt == a:
			cnt = 0
			a += 1
	return [n, a - 1]
ans = 0
for z in range(2, n2):
	if n % z == 0:
		(n, cur) = div(n, z)
		ans += cur
if n != 1:
	ans += 1
print(ans)


import math

def solve():
	N = int(input())
	ans = 0
	for i in range(2, int(math.sqrt(N)) + 2):
		n = 1
		cnt = 0
		while N % i == 0:
			N //= i
			cnt += 1
			if cnt == n:
				cnt = 0
				n += 1
				ans += 1
	if N != 1:
		ans += 1
	return ans
print(solve())


def prime_factorize(n):
	arr = []
	while n % 2 == 0:
		arr.append(2)
		n //= 2
	f = 3
	while f * f <= n:
		if n % f == 0:
			arr.append(f)
			n //= f
		else:
			f += 2
	if n != 1:
		arr.append(n)
	return arr
from collections import Counter
n = int(input())
c = Counter(prime_factorize(n))
cnt = 0
for (k, v) in list(c.items()):
	if v == 1:
		cnt += 1
	else:
		v0 = 1
		while v - v0 >= 0:
			v -= v0
			cnt += 1
			v0 += 1
print(cnt)


n = int(input())

def prime_factorize(n):
	n_origin = n + 0
	primelist = []
	a = 2
	while a * a <= n_origin:
		if n % a != 0:
			a += 1
			continue
		ex = 0
		while n % a == 0:
			ex += 1
			n = n // a
		primelist.append([a, ex])
		a += 1
	if n != 1:
		primelist.append([n, 1])
	return primelist

def sumf(n):
	return n * (n + 1) // 2
primes = prime_factorize(n)
ans = 0
for pl in primes:
	(a, ex) = pl
	i = 0
	while True:
		if sumf(i + 1) > ex:
			break
		i += 1
	ans += i
print(ans)


n = int(input())
if n == 1:
	print(0)
	return

def is_prime(n):
	if n <= 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			return False
	return True

def make_divisors(n):
	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)
	divisors.sort()
	return divisors
ans = []
cnt = 0
X = make_divisors(n)[1:]
for x in X:
	if is_prime(x):
		ans.append(x)
		n //= x
		cnt += 1
		e = 2
		while x ** e < n:
			ans.append(x ** e)
			e += 1
	elif x in ans:
		if n % x == 0:
			n //= x
			cnt += 1
print(cnt)


def doit(n):
	if n == 1:
		return 0
	c = 0
	temp = n
	for p in range(2, int(n ** 0.5) + 1):
		if temp % p == 0:
			e = 0
			while temp % p == 0:
				e += 1
				temp //= p
			c += int(0.5 * (-1 + (1 + 8 * e) ** 0.5))
	if temp == n:
		c += 1
	elif temp != 1:
		c += 1
	return c
print(doit(int(input())))


import math

def main():
	N = int(input())
	f = prime_factorize(N)
	cnt = 0
	if N == 1:
		print(cnt)
		return 0
	for p in f:
		prime = p[0]
		power = p[1]
		tmp = math.floor((math.sqrt(1 + 8 * power) - 1) / 2)
		cnt += tmp
	print(cnt)

def prime_factorize(n):
	ret = []
	for i in range(2, int(n ** 0.5) + 1):
		if n % i == 0:
			cnt = 0
			while n % i == 0:
				cnt += 1
				n = n // i
			ret.append([i, cnt])
	if n != 1:
		ret.append([n, 1])
	if len(ret) == 0:
		ret.append([n, 1])
	return ret
main()


n = int(input())
pf = {}
for i in range(2, int(n ** 0.5) + 1):
	while n % i == 0:
		pf[i] = pf.get(i, 0) + 1
		n //= i
if n > 1:
	pf[n] = 1
cnt = 1
ans = 0
for i in pf.values():
	tmp = i
	while tmp >= cnt:
		ans += 1
		tmp = tmp - cnt
		cnt += 1
	cnt = 1
print(ans)


n = int(input())
res = 0
for i in range(2, int(n ** 0.5) + 2):
	if n % i == 0:
		cnt = 0
		while n % i == 0:
			n //= i
			cnt += 1
		j = 1
		while cnt - j >= 0:
			res += 1
			cnt -= j
			j += 1
if n > 1:
	res += 1
print(res)


n = int(input())
ans = 0
i = 2
while n > 1 and i * i <= n:
	if n % i == 0:
		c = 0
		while n % i == 0:
			n = n / i
			c = c + 1
		Y = 1
		U = 2
		while c >= Y:
			ans = ans + 1
			Y = Y + U
			U = U + 1
	i += 1
if n > 1:
	ans = 1 + ans
print(ans)


N = int(input())
pf = {}
m = N
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
cnt = 0
for (k, v) in pf.items():
	t = 1
	while v > 0:
		v += -1 * t
		if v < 0:
			break
		cnt += 1
		t += 1
print(cnt)


N = int(input())
if N == 1:
	print('0')
	return

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr

def divcount(n):
	cnt = 0
	while n >= 0:
		n -= cnt + 1
		cnt += 1
	return cnt - 1
s = factorization(N)
t = [i[1] for i in s]
ans = 0
for i in t:
	ans += divcount(i)
print(ans)


import math
n = int(input())
p = 2
c = 0
curr = 0
while n % p == 0:
	curr += 1
	n //= p
j = 0
j = (math.sqrt(1 + 8 * curr) - 1) // 2
c += int(j)
for i in range(3, int(math.sqrt(n)) + 1, 2):
	p = i
	curr = 0
	while n % p == 0:
		curr += 1
		n //= p
	j = 0
	j = (math.sqrt(1 + 8 * curr) - 1) // 2
	c += int(j)
if n > 2:
	c += 1
print(c)


n = int(input())
ans = 0
c = 0
while not n % 2:
	n = n // 2
	c += 1
ans += int((pow(1 + 8 * c, 0.5) - 1) / 2)
for i in range(3, int(pow(n, 0.5)) + 1, 2):
	c = 0
	while not n % i:
		n = n // i
		c += 1
	ans += int((pow(1 + 8 * c, 0.5) - 1) / 2)
if n > 2:
	ans += 1
print(ans)


N = int(input())

def Prime_Factorize(n):
	primes = []
	while n % 2 == 0:
		n //= 2
		primes.append(2)
	f = 3
	while f * f <= n:
		if n % f == 0:
			n //= f
			primes.append(f)
		else:
			f += 2
	if n != 1:
		primes.append(n)
	return primes
Primes = Prime_Factorize(N)
cnt = 0
for p in Primes:
	e = 1
	z = p
	while N % z == 0 and N >= z:
		N //= z
		e += 1
		z = p ** e
		cnt += 1
	while N % p == 0:
		N //= p
print(cnt)


memo = [[None for i in range(50)] for j in range(50)]

def opt(n, k):
	if n < k:
		return 0
	else:
		if memo[n][k] == None:
			memo[n][k] = max(1 + opt(n - k, k + 1), opt(n, k + 1))
		return memo[n][k]

def prime_factorize(n):
	pf = {}
	d = 2
	orig_n = n
	while d * d <= orig_n:
		while n % d == 0:
			pf[d] = pf.get(d, 0) + 1
			n //= d
		d += 1
	if n > 1:
		pf[n] = 1
	return pf
print(sum([opt(e, 1) for e in prime_factorize(int(input())).values()]))


import collections
n = int(input())

def prime_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
if n == 1:
	print(0)
	return
c = collections.Counter(prime_factorize(n))
counts = list(c.values())
ans = 0
for i in counts:
	x = 0
	for j in range(i):
		x += j + 1
		if i >= x:
			ans += 1
		else:
			break
print(ans)


N = int(input())
ans = 0
for i in range(2, 10 ** 6 + 1):
	if N % i != 0:
		continue
	ans += 1
	cnta = 0
	cntb = 2
	while N % i == 0:
		N //= i
		cnta += 1
		if cnta > cntb:
			cnta -= cntb
			cntb += 1
			ans += 1
	if N == 1:
		break
if N != 1:
	ans += 1
print(ans)


N = int(input())
res = {}
ans = 0
i = 2
for i in range(2, int(N ** (1 / 2)) + 1):
	while N % i == 0:
		if i not in res:
			res[i] = 1
		else:
			res[i] += 1
		N /= i
if N != 1:
	res[N] = 1
for i in res:
	b = 1
	s = res[i]
	while b <= s:
		ans += 1
		s -= b
		b += 1
print(ans)


n = int(input())

def prime_factor(n):
	ass = []
	for i in range(2, int(n ** 0.5) + 1):
		while n % i == 0:
			ass.append(i)
			n //= i
	if n != 1:
		ass.append(n)
	return ass
d = prime_factor(n)
from collections import Counter
ans = 0
c = Counter(d)
for i in c:
	m = c[i]
	mm = 1
	while mm <= m:
		m -= mm
		mm += 1
		ans += 1
print(ans)


N = int(input())
ans = 0
f = 2
while True:
	if N % f == 0:
		c = 0
		while N % f == 0:
			N /= f
			c += 1
		n = 1
		while n * (n + 1) // 2 <= c:
			n += 1
		ans += n - 1
	if f * f > N:
		break
	f += 1
if N > 1:
	ans += 1
print(ans)


n = int(input())
res = 0
for i in range(2, int(n ** 0.5) + 1):
	if n % i == 0:
		e = 0
		while n % i == 0:
			n //= i
			e += 1
		tmp = 0
		for i in range(1, e + 1):
			if e >= i:
				e -= i
				tmp += 1
		res += tmp
if n > 1:
	res += 1
print(res)


N = int(input())
p = []
cnt = 0
while N % 2 == 0:
	cnt += 1
	N = N // 2
if cnt > 0:
	p.append(cnt)
t = 3
while N >= t and t <= 10 ** 6:
	cnt = 0
	while N % t == 0:
		cnt += 1
		N = N // t
	if cnt > 0:
		p.append(cnt)
	t += 2
if N > 10 ** 6:
	p.append(1)
ans = 0
for c in p:
	a = int((-1 + pow(1 + 8 * c, 0.5)) / 2)
	ans += a
print(ans)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, bisect
import sys
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
stdin = sys.stdin
ni = lambda : int(ns())
nf = lambda : float(ns())
na = lambda : list(map(int, stdin.readline().split()))
nb = lambda : list(map(float, stdin.readline().split()))
ns = lambda : stdin.readline().rstrip()

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
N = ni()
res = factorization(N)
ans = 0
sum_ = [x for x in range(1, 200)]
for i in range(len(sum_) - 1):
	sum_[i + 1] += sum_[i]
for (k, v) in res:
	ans += bisect.bisect_right(sum_, v)
if N == 1:
	print(0)
else:
	print(ans)


n = int(input())
pf = {}
for i in range(2, int(n ** 0.5) + 1):
	while not n % i:
		pf[i] = pf.get(i, 0) + 1
		n //= i
if n > 1:
	pf[n] = 1
cnt = 0
for i in pf.values():
	for j in range(1, 50):
		if i - j >= 0:
			cnt += 1
			i -= j
		else:
			break
print(cnt)


answer = 0
pf = {}
m = int(input())
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
for (i, j) in pf.items():
	temp = j
	for k in range(1, j + 1):
		temp -= k
		if temp < 0:
			break
		else:
			answer += 1
print(answer)


def div(n):
	i = 2
	a = n
	D = {}
	tmp = 1
	while i * i <= n:
		cnt = 0
		while a % i == 0:
			a = a // i
			tmp *= i
			cnt += 1
		if cnt > 0:
			D[i] = cnt
		i += 1
	if tmp != n:
		D[n] = 1
	return D
N = int(input())
D = div(N)
ans = 0
for v in D.values():
	i = 1
	total = 1
	while v >= total + (i + 1):
		i += 1
		total += i
	ans += i
print(ans)


n = int(input())
n1 = n
pn = []
cnt = 2
ans = 0
while cnt <= int(n ** 0.5):
	while n1 % cnt == 0:
		n1 = n1 // cnt
		pn.append(cnt)
	cnt += 1
pns = list(set(pn))
ansa = []
for i in pns:
	ansa.append(pn.count(i))
for i in ansa:
	x = 1
	while i > 0:
		i -= x
		if i < 0:
			break
		x += 1
		ans += 1
print(ans + 1 if n1 != 1 else ans)


N = int(input())
NN = N
i = 2
ans = 0
while i * i <= NN:
	if N % i == 0:
		j = 0
		while N % i == 0:
			N /= i
			j += 1
		k = 1
		while j > 0:
			if j - k < 0:
				break
			ans += 1
			j -= k
			k += 1
	i += 1
if N != 1:
	ans += 1
print(ans)


N = int(input())
ans = 0
n = N
counter = []
for i in range(2, int(N ** 0.5) + 2):
	if n % i == 0:
		counter.append(1)
		n = n // i
		while n % i == 0:
			counter[-1] += 1
			n = n // i
if n != 1:
	counter.append(1)
for c in counter:
	a = 1
	while c >= a:
		c -= a
		a += 1
		ans += 1
print(ans)


n = int(input())
r = 0
for p in range(2, int(n ** 0.5) + 1):
	e = 0
	while n % p == 0:
		e += 1
		n /= p
	i = 1
	while e >= i:
		e -= i
		r += 1
		i += 1
if n != 1:
	r += 1
print(r)


n = int(input())
d = 2
ans = 0
while d * d <= n:
	if n % d != 0:
		d += 1
		continue
	z = d
	while n % z == 0:
		n //= z
		z *= d
		ans += 1
	while n % d == 0:
		n /= d
if n != 1:
	ans += 1
print(ans)


n = int(input())
import math
from bisect import bisect
ps = {}
for i in range(2, math.ceil(math.sqrt(n))):
	while n % i == 0:
		n //= i
		if i in ps:
			ps[i] += 1
		else:
			ps[i] = 1
	if n == 1:
		break
if n > 1:
	ps[n] = 1
ss = [i * (i + 1) // 2 for i in range(1, 42)]
ans = 0
for p in ps:
	ans += bisect(ss, ps[p])
print(ans)


import sys
n = int(input())
ans = 0
if n == 1:
	print(0)
	sys.exit()
ma = int(n ** 0.5) + 1
for i in range(2, ma):
	j = 1
	k = 0
	while n % i == 0:
		k += 1
		n //= i
	else:
		while j <= k:
			ans += 1
			k -= j
			j += 1
if n != 1:
	ans += 1
print(ans)


from math import sqrt
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(2, int(sqrt(n)) + 10):
	while n % i == 0:
		d[i] += 1
		n //= i
if n != 1:
	d[n] += 1
ans = 0
for v in d.values():
	mn = 1
	while v >= mn:
		v -= mn
		ans += 1
		mn += 1
print(ans)


n = int(input())
prime = []
for i in range(2, int(n ** 0.5) + 1):
	cnt = 0
	while n % i == 0:
		n //= i
		cnt += 1
	prime.append(cnt)
	if n == 1:
		break
if n > 1:
	prime.append(1)
ans = 0
for x in prime:
	for i in range(1, x + 1):
		if x >= i:
			ans += 1
			x -= i
		else:
			break
print(ans)


import math
N = int(input())
x = N
n = math.floor(math.sqrt(N))
p = {}
i = 2
while i <= n:
	while x % i == 0:
		p.setdefault(i, 0)
		p[i] += 1
		x //= i
	i += 1
if x != 1:
	p.setdefault(x, 1)
ans = 0
for v in p.values():
	i = 1
	while v - i >= 0:
		v -= i
		ans += 1
		i += 1
print(ans)


def division(n):
	if n < 2:
		return []
	prime_fac = []
	for i in range(2, int(n ** 0.5) + 1):
		cnt = 0
		while n % i == 0:
			n //= i
			cnt += 1
		if cnt != 0:
			prime_fac.append((i, cnt))
	if n > 1:
		prime_fac.append((n, 1))
	return prime_fac
n = int(input())
div = division(n)
ans = 0
for (i, e) in div:
	b = 1
	while b <= e:
		e -= b
		b += 1
		ans += 1
print(ans)


N = int(input())

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
l_2d = factorization(N)
cnt = 0
for l in l_2d:
	p = l[0]
	e = l[1]
	if p == 1:
		continue
	for i in range(1, 10 ** 7):
		if e < i:
			break
		cnt += 1
		e -= i
print(cnt)


n = int(input())
a = 1
p = 1
while p < 1000000.0:
	c = 0
	t = 0
	p += 1
	while n % p < 1:
		n /= p
		x = c == t
		t += x
		c += 1 - t * x
		a += x
print(a - (n < 2))


N = int(input())
l = [1, 3, 6, 10, 15, 21, 28, 36, 45]
a = 0
for i in range(2, 1000001):
	t = 0
	while N % i == 0:
		t += 1
		N //= i
	if t:
		for i in range(9):
			if t < l[i]:
				a += i
				break
if N > 1000000:
	a += 1
print(a)


n = int(input())
r = int(n ** 0.5 + 1)
ans = 0
for i in range(2, r):
	e = 0
	while n % i == 0:
		n //= i
		e += 1
	k = 1
	while e >= k:
		e -= k
		ans += 1
		k += 1
if n != 1:
	ans += 1
print(ans)


import bisect

def factorization(n):
	if n == 1:
		return []
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
n = int(input())
sigma = [1]
for i in range(2, 20):
	sigma.append(i + sigma[i - 2])
ans = 0
for (i, j) in factorization(n):
	ans += bisect.bisect_right(sigma, j)
print(ans)


from math import sqrt
pf = {}
m = int(input())
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
ans = 0
for value in pf.values():
	ans += int((sqrt(value * 8 + 1) - 1) / 2)
print(ans)


n = int(input())
ans = 0
for i in range(2, 1000010):
	power = 0
	j = 1
	if n % i == 0:
		while n % i == 0:
			power += 1
			n = n // i
		while power >= j:
			power -= j
			j += 1
			ans += 1
if n > 1:
	ans += 1
print(ans)


import collections

def prime_factorize(n):
	a = []
	while n % 2 == 0:
		a.append(2)
		n //= 2
	f = 3
	while f ** 2 <= n:
		if n % f == 0:
			a.append(f)
			n //= f
		else:
			f += 2
	if n != 1:
		a.append(n)
	return a
count = 0
N = int(input())
if N <= 1:
	print(0)
	return
else:
	c = collections.Counter(prime_factorize(N))
	K = [sum(range(1, i)) for i in range(2, 11)]
	for i in c:
		for j in range(1, len(K)):
			if c[i] < K[j]:
				count += j
				break
	print(count)


from collections import Counter
N = int(input())
factors = []
i = 2
while N > 1:
	if N < i * i:
		factors.append(N)
		break
	while N % i == 0:
		factors.append(i)
		N //= i
	i += 1
ans = 0
for count in Counter(factors).values():
	i = 1
	while count >= i:
		count -= i
		i += 1
		ans += 1
print(ans)


n = int(input())
i = 2
ans = 0
while True:
	if i * i > n:
		break
	if n % i == 0:
		cnt = 0
		while n % i == 0:
			n /= i
			cnt += 1
		k = 1
		while cnt >= k:
			cnt -= k
			k += 1
		ans += k - 1
	i += 1
if n > 1:
	ans += 1
print(ans)


N = int(input())
i = 2
tmp = N
ans = 0
while i * i <= N:
	cnt = 0
	while tmp % i == 0:
		tmp //= i
		cnt += 1
	if cnt > 0:
		k = 1
		while cnt - k >= 0:
			cnt -= k
			ans += 1
			k += 1
	i += 1
if tmp != 1:
	ans += 1
print(ans)


pf = {}
m = int(input())
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
ans = 0
for v in pf.values():
	now = v
	cou = 1
	while True:
		if now - cou >= 0:
			ans += 1
			now -= cou
			cou += 1
		else:
			break
print(ans)


N = int(input())
a = []
count = 0
count2 = 0
count3 = 0
X = int(N ** 0.5)
for i in range(X + 1):
	if i == 0 or i == 1:
		pass
	elif N % i == 0:
		while N % i == 0:
			N /= i
			count2 += 1
		j = 1
		count3 = 0
		while count2 - j >= 0:
			count2 -= j
			j = j + 1
			count3 += 1
		count += count3
		count2 = 0
if N > 1:
	count += 1
print(count)


from collections import defaultdict
n = int(input())
d = defaultdict(int)
k = 2
while n > 1 and k * k <= n:
	if n % k == 0:
		d[k] += 1
		n //= k
	else:
		k += 1
if n > 1:
	d[n] += 1
ans = 0
for (k, v) in d.items():
	a = 1
	while v >= a:
		v -= a
		a += 1
		ans += 1
print(ans)


n = int(input())
m = n
primes = {}
for i in range(2, int(n ** 0.5 + 2)):
	while m % i == 0:
		m //= i
		if i not in primes:
			primes[i] = 1
		else:
			primes[i] += 1
	if i > m:
		break
if m != 1:
	primes[m] = 1
cnt = 0
num = 0
flag = True
while flag == True:
	num += 1
	flag = False
	for i in primes:
		if 0 < primes[i] <= num * 2:
			cnt += 1
			primes[i] = 0
		elif primes[i] > num * 2:
			cnt += 1
			flag = True
			primes[i] -= num
print(cnt)


import math

def prime(num):
	array = []
	tmp = int(math.sqrt(n)) + 1
	for i in range(2, tmp):
		while num % i == 0:
			num /= i
			array.append(i)
	if array == []:
		return [num]
	else:
		if num > 1:
			array.append(int(num))
		return array
n = int(input())
P = prime(n)
P = sorted(P)
num = n
if 1 in P:
	print(0)
else:
	ans = 0
	tmp = 0
	for i in range(0, len(P)):
		if i == 0:
			tmp = P[i]
		elif P[i] == P[i - 1]:
			tmp *= P[i]
		else:
			tmp = P[i]
			num = n
		if num % tmp == 0:
			num /= tmp
			ans += 1
	print(ans)


N = int(input())
if N == 1:
	print(0)
	exit()
l = []
ans = 0
for i in range(2, int(N ** 0.5) + 1):
	cnt = 0
	while N % i == 0:
		cnt += 1
		N //= i
	if cnt > 0:
		l.append((i, cnt))
		ans += int((-1 + (1 + 8 * cnt) ** 0.5) / 2)
if N > 1:
	l.append((N, 1))
	ans += 1
print(ans)


n = int(input())
ans = 0
for i in range(2, int(n ** 0.5) + 1):
	count = 1
	loop = 1
	while n % i == 0:
		n = int(n / i)
		count -= 1
		if count == 0:
			ans += 1
			loop += 1
			count = loop
if n > 1:
	ans += 1
print(ans)


def prime_factors(n):
	i = 2
	factors = []
	while i ** 2 <= n:
		if n % i != 0:
			i += 1
		else:
			factors.append(i)
			n = n // i
	if n > 1:
		factors.append(n)
	return factors

def resolve():
	N = int(input())
	import collections
	factors = collections.Counter(prime_factors(N))
	numbers = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]
	cnt = 0
	for (k, v) in list(factors.items()):
		cnt += numbers[v]
	print(cnt)
if '__main__' == __name__:
	resolve()


import math
n = int(input())

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
f = factorization(n)
l = len(f)
x = 0
for i in range(l):
	x += int((-1 + math.sqrt(1 + 8 * f[i][1])) // 2)
if n == 1:
	x = 0
print(x)


import math
import collections

def prime_diviation(n):
	factors = []
	i = 2
	while i <= math.floor(math.sqrt(n)):
		if n % i == 0:
			factors.append(int(i))
			n //= i
		else:
			i += 1
	if n > 1:
		factors.append(n)
	return factors
N = int(input())
if N == 1:
	print(0)
	return
pr = prime_diviation(N)
prs = set(pr)
prcnt = collections.Counter(pr)
ans = 0
for a in prs:
	i = 1
	cnt = 2 * prcnt[a]
	while cnt >= i * (i + 1):
		i += 1
	ans += i - 1
print(ans)


from collections import Counter

def prime_fact(num):
	prime = []
	for i in range(2, int(num ** 0.5) + 1):
		while num % i == 0:
			prime.append(i)
			num //= i
	if num != 1:
		prime.append(num)
	return prime
n = int(input())
cnt = Counter(prime_fact(n))
ans = 0
for c in cnt.values():
	tmp = 1
	while c >= tmp:
		c -= tmp
		ans += 1
		tmp += 1
print(ans)


def pfact(m):
	pf = {}
	for i in range(2, int(m ** 0.5) + 1):
		while m % i == 0:
			pf[i] = pf.get(i, 0) + 1
			m //= i
	if m > 1:
		pf[m] = 1
	return pf
n = int(input())
pl = pfact(n).values()
ans = 0
for i in pl:
	k = i
	for j in range(1, 41):
		k -= j
		if k < 0:
			break
		ans += 1
print(ans)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
N = int(input())
if N == 1:
	print('0')
	return
factors = factorization(N)
ans = 0
for factor in factors:
	num = factor[1]
	x = 1
	for i in range(num + 1):
		if i ** 2 + i > 2 * num:
			x = i - 1
			break
	ans += x
print(ans)


n = int(input())
ans = 0
N = n
for i in range(2, int(n ** 0.5 // 1 + 2)):
	if n % i == 0:
		c = 0
		while n % i == 0:
			n //= i
			c += 1
		j = 1
		while c - j >= 0:
			ans += 1
			c -= j
			j += 1
if n > 1:
	ans = ans + 1
print(ans)


n = int(input())
s = []
for i in range(2, int(n ** 0.5) + 1):
	t = 0
	while n % i == 0:
		n //= i
		t += 1
	s.append(t)
	if n == 1:
		break
if n > 1:
	s.append(1)
ans = 0
for i in s:
	for j in range(1, i + 1):
		if i >= j:
			ans += 1
			i -= j
		else:
			break
print(ans)


from collections import defaultdict
n = int(input())
d = defaultdict(int)
i = 2
while i * i <= n:
	while n % i == 0:
		d[i] += 1
		n /= i
	i += 1
if n != 1:
	d[n] += 1
ans = 0
for v in list(d.values()):
	x = 0
	while (x + 1) * (x + 2) // 2 <= v:
		x += 1
	ans += x
print(ans)


n = int(input())
M = 10 ** 6
l = []
p = [1] * M
for i in range(2, M):
	if p[i]:
		l += [i]
		for j in range(2 * i, M, i):
			p[j] = 0
d = {}
for k in l:
	while n % k < 1:
		n //= k
		d[k] = d.get(k, 0) + 1
a = 0
for i in d.values():
	t = c = 0
	while t + c < i:
		c += 1
		t += c
	a += c
print(a + (n > 1))


n = int(input())
total = 0
for i in range(2, int(n ** (1 / 2) + 2)):
	acc = 0
	while n % i == 0:
		acc += 1
		n //= i
	total += (-1 + (1 + 8 * acc) ** (1 / 2)) // 2
if n != 1:
	total += 1
print(int(total))


import collections
import bisect
n = int(input())
primes = []
a = 2
while n > a * a:
	while n % a == 0:
		primes.append(a)
		n //= a
	a += 1
if n != 1:
	primes.append(n)
ctr = collections.Counter(primes)
ans = 0
for (k, v) in ctr.items():
	for i in range(1, 100):
		if v >= i * (i + 1) // 2:
			ans += 1
print(ans)


n = int(input())
a = 0
for i in range(2, 10 ** 6):
	b = 0
	while n % i == 0:
		n //= i
		b += 1
	c = d = 0
	while c + d < b:
		c += 1
		d += c
	a += c
print(a + (n > 1))


import math
N = int(input())
ans = 0
N_sqrt = int(math.sqrt(N))
primeset = set()
primeset.add(2)
if N == 1:
	print(0)
else:
	for i in range(2, N_sqrt + 5):
		if N % i == 0:
			ans += 1
			nowdiv = 2
			numofdiv = 0
			N //= i
			while N % i == 0:
				numofdiv += 1
				N //= i
				if numofdiv == nowdiv:
					ans += 1
					nowdiv += 1
					numofdiv = 0
	if N != 1:
		ans += 1
	print(ans)


from math import sqrt
n = int(input())
cnt = [0] * 1000000
ans = 0
for i in range(2, int(sqrt(n))):
	if n == 1:
		break
	j = 1
	while n % i == 0:
		n = n // i
		cnt[i - 1] += 1
		if cnt[i - 1] == j:
			ans += 1
			j += 1
			cnt[i - 1] = 0
if n != 1:
	ans += 1
print(ans)


import collections
N = int(input())

def make_divisors(n):
	(lower_divisors, upper_divisors) = ([], [])
	i = 1
	while i * i <= n:
		if n % i == 0:
			lower_divisors.append(i)
			if i != n // i:
				upper_divisors.append(n // i)
		i += 1
	return lower_divisors + upper_divisors[::-1]

def prime_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
use_list = []
cnt = 0
while True:
	flag = 0
	div_list = make_divisors(N)
	if len(div_list) == 1:
		break
	for i in range(1, len(div_list)):
		if len(collections.Counter(prime_factorize(div_list[i]))) == 1 and div_list[i] not in use_list:
			use_list.append(div_list[i])
			N = N // div_list[i]
			cnt += 1
			flag = 1
			break
	if flag == 0:
		break
print(cnt)


n = int(input())
a = []
while n % 2 == 0:
	a.append(2)
	n = n / 2
for i in range(3, int(n ** 0.5) + 1, 2):
	while n % i == 0:
		a.append(i)
		n = n / i
if n > 2:
	a.append(int(n))
l = list(set(a))
c = 1
t = 0
for i in range(len(l)):
	while 0.5 * (c * (c + 1)) <= a.count(l[i]):
		t = t + 1
		c = c + 1
	c = 1
print(t)


import math
N = int(input())
ans = 0
arr = []
tmp = 1
for i in range(int(math.sqrt(N)) + 5):
	tmp = 1
	while N % (i + 2) ** tmp == 0:
		N = N / (i + 2) ** tmp
		ans += 1
		tmp += 1
	while N % (i + 2) == 0:
		N = N // (i + 2)
if N > 1:
	ans += 1
print(ans)


n = int(input())
m = n
exp = []
cnt = 0
while n % 2 == 0:
	cnt += 1
	n //= 2
if cnt > 0:
	exp.append(cnt)
i = 3
while i * i <= n:
	cnt = 0
	while n % i == 0:
		cnt += 1
		n //= i
	exp.append(cnt)
	i += 2
if n != 1:
	exp.append(1)
opr = 0
for x in exp:
	opr += int((-1 + (8 * x + 1) ** (1 / 2)) / 2)
print(opr)


import math
n = int(input())
arr = []
j = 2
while j * j <= n:
	cnt = 0
	while n % j == 0:
		cnt = cnt + 1
		n = n / j
	if cnt != 0:
		arr.append(cnt)
	j = j + 1
if n > 1:
	arr.append(1)
ans = int(0)
for i in arr:
	ans = ans + int((math.sqrt(1 + 8 * i) - 1) / 2)
print(ans)


import math
a = int(input())
ans = 0
for i in range(1, int(math.sqrt(a)), 1):
	if a % i == 0 and (not i == 1):
		cnt = 0
		while a % i == 0:
			cnt += 1
			a = a / i
		ans += (math.sqrt(2 * cnt + 0.25) - 0.5) // 1
if not a == 1:
	print(int(ans + 1))
else:
	print(int(ans))


N = int(input())
p = []
r = 0
if N % 2 == 0:
	c = 0
	while N % 2 == 0:
		N = N // 2
		c += 1
	p.append(c)
for i in range(3, int(N ** 0.5) + 1, 2):
	if N % i == 0:
		c = 0
		while N % i == 0:
			N = N // i
			c += 1
		p.append(c)
if N != 1:
	p.append(1)
while p:
	r += int(((8 * p.pop() + 1) ** 0.5 - 1) / 2)
print(r)


from collections import defaultdict
import math
N = int(input())
d = defaultdict(int)
for i in range(2, int(math.sqrt(N)) + 1):
	while N % i == 0:
		d[i] += 1
		N //= i
if N > 1:
	d[N] = 1
ans = 0
for v in d.values():
	k = 1
	while k <= v:
		ans += 1
		v -= k
		k += 1
print(ans)


ans = 0
N = int(input())
x = 2
while not N % x:
	ans += 1
	N //= x
	x *= 2
while not N % 2:
	N //= 2
i = 3
while i * i <= N:
	x = i
	while not N % x:
		ans += 1
		N //= x
		x *= i
	while not N % i:
		N //= i
	i += 2
if N > 1:
	ans += 1
print(ans)


import math
N = int(input())
t = 0
p = N
tmp = int(math.sqrt(N)) + 1
for num in range(2, tmp):
	d = 1
	while N % num ** d == 0:
		N //= num ** d
		t += 1
		d += 1
	if N % num == 0:
		while N % num == 0:
			N //= num
if N != 1:
	t += 1
if t == 0 and p != 1:
	t = 1
print(t)


def find_primes(n):
	ps = []
	t = [True] * n
	t[0] = t[1] = False
	for i in range(2, n):
		if not t[i]:
			continue
		ps.append(i)
		for j in range(i, n, i):
			t[j] = False
	return ps

def solve(string):
	n = int(string)
	if n == 1:
		return '0'
	rn = int(n ** 0.5 + 1)
	ps = find_primes(rn)
	ans = 0
	for i in ps:
		k = 1
		while n % i ** k == 0:
			ans += 1
			n //= i ** k
			k += 1
	return str(ans + (n >= rn))

def __starting_point():
	import sys
	print(solve(sys.stdin.read().strip()))
__starting_point()


import math
n = int(input())
d = n
m = {}
for i in range(2, int(math.sqrt(n)) + 1):
	m[i] = 0
	while d % i == 0:
		d //= i
		m[i] += 1
res = 0
for i in list(m.values()):
	res += int(math.sqrt(i * 2 + 0.25) - 0.5)
if d > 1:
	res += 1
print(res)


n = int(input())
ans = 0
i = 0
if n % 2 == 0:
	while n % 2 == 0:
		i += 1
		n //= 2

def judge(n):
	s = 0
	i = 0
	while s <= n:
		i += 1
		s = i * (i + 1) // 2
	return i - 1
ans += judge(i)
for i in range(3, int(n ** 0.5), 2):
	if n % i == 0:
		cnt = 0
		while n % i == 0:
			n //= i
			cnt += 1
		ans += judge(cnt)
if n != 1:
	ans += 1
print(ans)


a = int(input())
d = 0
for i in range(2, int(a ** 0.5) + 1):
	c = 0
	while a % i == 0:
		c += 1
		a //= i
	for i in range(1, 60):
		if c >= i:
			c -= i
			d += 1
		else:
			break
	if a == 1:
		break
if a != 1:
	d += 1
print(d)


n = int(input())
p = 2
ans = 0
while n > 1:
	if p > 10 ** 6:
		ans += 1
		break
	e = 1
	while n % p ** e == 0:
		n = n // p ** e
		e += 1
		ans += 1
	while n % p == 0:
		n = n // p
	p += 1
print(ans)


import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import sqrt, floor

def main():

	def factorization(n):
		l = []
		t = n
		for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
			if t % i == 0:
				cnt = 0
				while t % i == 0:
					cnt += 1
					t = t // i
				l.append([i, cnt])
		if t != 1:
			l.append([t, 1])
		if not l:
			l.append([n, 1])
		return l
	n = int(input())
	if n == 1:
		print(0)
		return
	p = factorization(n)
	r = 0
	for pe in p:
		pe1 = pe[1]
		cnt = 1
		while pe1 >= cnt:
			pe1 -= cnt
			cnt = cnt + 1
			r += 1
	print(r)

def __starting_point():
	main()
__starting_point()


import sys
from itertools import chain
import numpy as np
import math

def factorize(n: int):
	count = 0
	while n % 2 == 0:
		count += 1
		n = n // 2
	if count > 0:
		arr = [(2, count)]
	else:
		arr = []
	for facter in range(3, n + 1, 2):
		if facter * facter > n:
			if n > 1:
				arr.append((n, 1))
			break
		count = 0
		while n % facter == 0:
			count += 1
			n = n // facter
		if count > 0:
			arr.append((facter, count))
	return arr

def case(n):
	t = 0
	i = 1
	while True:
		t += i
		if t > n:
			return i - 1
		i += 1

def solve(N: int):
	factors = factorize(N)
	answer = 0
	for (f, count) in factors:
		answer += case(count)
	return answer

def main():
	tokens = chain(*(line.split() for line in sys.stdin))
	N = int(next(tokens))
	answer = solve(N)
	print(answer)

def __starting_point():
	main()
__starting_point()


n = int(input())
int_sqrt = lambda x: int(x ** 0.5) + 1

def prime_factor(x):
	d = {}
	for i in p:
		while x % i < 1:
			x //= i
			d[i] = d.get(i, 0) + 1
		if x < 2:
			break
	if x > 1:
		d[x] = 1
	return d
p = range(2, int_sqrt(n))
d = prime_factor(n)
a = 0
for i in d.values():
	t = c = 0
	while t + c < i:
		c += 1
		t += c
	a += c
print(a)


n = int(input())
import math
s = int(math.sqrt(n)) + 1
i = 2
c1 = 0
c2 = 1
ans = 0
while i <= s:
	if n % i == 0:
		n //= i
		c1 += 1
		if c1 == c2:
			c1 = 0
			c2 += 1
			ans += 1
	else:
		c2 = 1
		i += 1
		c1 = 0
if n > s:
	ans += 1
print(ans)


import math
n = int(input())
MAX = int(math.sqrt(n)) + 1
a = [0] * MAX
for i in range(2, MAX):
	while n % i == 0:
		n /= i
		a[i] += 1
if n != 1:
	ans = 1
else:
	ans = 0
for i in a:
	for j in range(MAX):
		p = int(j * (j + 1) / 2)
		if i < p:
			ans += j - 1
			break
print(ans)


import sys
N = int(input())
if N == 1:
	print(0)
	return

def prime2(N):
	arr = []
	temp = N
	setprime = set()
	for i in range(2, int(-(-N ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			setprime.add(i)
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
		setprime.add(temp)
	if arr == []:
		arr.append([N, 1])
	return (arr, setprime)
(arr, _) = prime2(N)
ls = []
ans = 0
for i in arr:
	ls.append(i[1])
for j in ls:
	k = 1
	ii = 0
	while j >= k:
		j -= k
		k += 1
		ii += 1
	ans += ii
print(ans)


import collections
import sys

def input():
	return sys.stdin.readline().rstrip()

def prime_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
N = int(input())
count = 0
prime_list = collections.Counter(prime_factorize(N))
for key in prime_list:
	num = prime_list[key]
	for i in range(1, num + 1):
		if i <= num:
			num -= i
			count += 1
		else:
			break
print(count)


from collections import Counter
import math
N = int(input())
Nso = []
Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)
for i in range(2, Nruto + 1):
	while N % i == 0:
		N = N // i
		Nso.append(i)
	if N == 1:
		break
	Nruto = math.sqrt(N)
	Nruto = math.floor(Nruto)
Nso.append(N)
if 1 in Nso:
	Nso.remove(1)
Nso = Counter(Nso)
ans = 0
for v in list(Nso.values()):
	count = 0
	for i in range(1, v + 1):
		if count + i > v:
			break
		else:
			count += i
			ans += 1
print(ans)


def fc(n):
	wk = 0
	for i in range(2, int(n ** 0.5)):
		j = i
		while n % j == 0:
			wk += 1
			n //= j
			j *= i
		while n % i == 0:
			n //= i
			continue
	if n != 1:
		wk += 1
	return wk
n = int(input())
print(fc(n))


n = int(input())

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
q = factorization(n)
ans = 0
for i in range(len(q)):
	l = q[i][1]
	if q[i][0] == 1:
		continue
	for j in range(1, l + 1):
		l -= j
		if l < 0:
			break
		else:
			ans += 1
print(ans)


N = int(input())
P = []
Q = []
a = 0
for i in range(2, 10 ** 3):
	if all((i % p for p in P)):
		P.append(i)
for i in range(3, 10 ** 6):
	if all((i % p for p in P)):
		Q.append(i)
for p in P + Q:
	i = 0
	while N % p < 1:
		N //= p
		i += 1
	a += int((2 * i + 0.25) ** 0.5 - 0.5)
print(a + (N > 1))


n = int(input())

def factorize(n):
	fct = []
	(b, e) = (2, 0)
	while b * b <= n:
		while n % b == 0:
			n = n // b
			e = e + 1
		if e > 0:
			fct.append((b, e))
		(b, e) = (b + 1, 0)
	if n > 1:
		fct.append((n, 1))
	return fct
l = factorize(n)
ans = 0
for (i, j) in l:
	ans += int((-1 + pow(1 + 8 * j, 0.5)) / 2)
print(ans)


from math import sqrt
from collections import defaultdict
N = int(input())
f = defaultdict(int)
for p in [2] + list(range(3, int(sqrt(N)) + 1, 2)):
	while N % p == 0:
		N //= p
		f[p] += 1
	if N == 1:
		break
if N != 1:
	f[N] += 1
ans = 0
for e in f.values():
	ans += int((sqrt(1 + 8 * e) - 1) / 2)
print(ans)


import sys

def input():
	return sys.stdin.readline().rstrip()

class Sieve2:

	def __init__(self, n):
		self.primes = []
		self.f = [0] * (int(n ** 0.5) + 1)
		self.f[0] = self.f[1] = -1
		for i in range(2, int(n ** 0.5) + 1):
			if self.f[i]:
				continue
			self.primes.append(i)
			self.f[i] = i
			for j in range(i * i, int(n ** 0.5) + 1, i):
				if not self.f[j]:
					self.f[j] = i

	def prime_fact(self, x):
		fact_dict = dict()
		for p in self.primes:
			if p * p > x:
				break
			while x % p == 0:
				x //= p
				fact_dict[p] = fact_dict.get(p, 0) + 1
		if x > 1:
			fact_dict[x] = fact_dict.get(x, 0) + 1
		return fact_dict

def main():
	n = int(input())
	Sieve = Sieve2(n)
	prime_dict = Sieve.prime_fact(n)
	ans = 0
	for fact in prime_dict.values():
		f = fact
		x = 1
		while f > 0:
			if f >= x:
				ans += 1
			f -= x
			x += 1
	print(ans)

def __starting_point():
	main()
__starting_point()


def this(k):
	a = int(pow(1 + 8 * k, 0.5))
	return (a - 1) // 2
from collections import Counter
c = Counter([])
n = int(input())
for i in range(2, int(pow(n, 0.5)) + 1):
	if n % i == 0:
		sumi = 0
		while n % i == 0:
			n = n // i
			sumi += 1
		c[i] = sumi
if n != 1:
	c[n] = 1
ans = 0
for item in c.values():
	ans += this(item)
print(ans)


def factorize(n):
	ans = 0
	(b, e) = (2, 0)
	while b * b <= n:
		while n % b == 0:
			n = n // b
			e = e + 1
		if e > 0:
			ans += int((-1 + (1 + 8 * e) ** (1 / 2)) / 2)
		(b, e) = (b + 1, 0)
	if n > 1:
		ans += 1
	return ans
N = int(input())
print(factorize(N))


n = int(input())
ans = 0
dn = n
g = {}
d = 2
while d * d <= dn:
	if dn % d == 0:
		if not g.get(d):
			g[d] = 0
		while dn % d == 0:
			dn //= d
			g[d] += 1
	d += 1
if dn > 1:
	g[dn] = 1
for v in g:
	i = g[v]
	cnt = 1
	while cnt <= i:
		i -= cnt
		cnt += 1
		ans += 1
print(ans)


import math
N = int(input())
temp = N
total = 0
for n in range(2, int(-(-math.sqrt(N) // 1)) + 1):
	count1 = 1
	count2 = 0
	while temp % n == 0:
		temp = temp // n
		count2 += 1
		if count2 == count1:
			count2 = 0
			count1 += 1
			total += 1
if temp != 1:
	total += 1
print(total)


n = int(input())

def prime_factor(n):
	ass = []
	for i in range(2, int(n ** 0.5) + 1):
		while n % i == 0:
			ass.append(i)
			n //= i
	if n != 1:
		ass.append(n)
	return ass
p = prime_factor(n)
from collections import Counter
c = Counter(p)
ans = 0
for i in c:
	m = c[i]
	for j in range(1, 10 ** 20):
		if j > m:
			break
		ans += 1
		m -= j
print(ans)


from math import sqrt
n = int(input())
t = 0
i = 2
while i * i <= n:
	if n % i == 0:
		c = 0
		while n % i == 0:
			n //= i
			c += 1
		t += (int(sqrt(8 * c + 1)) - 1) // 2
	i += 1
if n > 1:
	t += 1
print(t)


n = int(input())
pf = {}
m = n
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
ans = 0
for i in pf.items():
	m = i[1]
	a = 1
	cnt = 1
	while a <= m:
		cnt += 1
		a += cnt
	cnt -= 1
	ans += cnt
print(ans)


n = int(input())
limit = n ** 0.5
q = 2
if n == 1:
	print(0)
else:
	ans = 0
	while q < limit:
		cnt = 0
		while n % q == 0:
			cnt += 1
			n /= q
		if cnt > 0:
			ans += int((2 * cnt + 0.25) ** 0.5 - 0.5)
			limit = n ** 0.5
		q += 1
	if n > 1:
		ans += 1
	print(ans)


n = int(input())
ans = 0
for i in range(2, int(n ** 0.5) + 1):
	if n % i == 0:
		cnt = 1
		k = 0
		while n % i == 0:
			k += 1
			if cnt == k:
				ans += 1
				cnt += 1
				k = 0
			n //= i
if n > 1:
	ans += 1
print(ans)


import math
n = int(input())

def fac(n):
	arr = []
	temp = n
	for i in range(2, math.ceil(math.sqrt(n) + 1)):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
l = fac(n)
if n == 1:
	print(0)
else:
	ans = 0
	for i in range(len(l)):
		count = l[i][1]
		p = 0
		k = 1
		while count > 0:
			if count - k < 0:
				break
			p += 1
			count -= k
			k += 1
		ans += p
	print(ans)


from collections import defaultdict
D = defaultdict(int)
N = int(input())
a = 2
while a * a <= N:
	if N % a:
		a += 1
	else:
		N //= a
		D[a] += 1
if N != 1:
	D[N] += 1
ans = 0
for (k, v) in D.items():
	i = 0
	while i * (i + 1) <= v * 2:
		i += 1
	ans += i - 1
print(ans)


N = int(input())
pf = {}
m = N
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
X = list(pf.values())
ans = 0
for i in X:
	temp = 1
	while i >= temp:
		i -= temp
		temp += 1
		ans += 1
print(ans)


def f(n):
	p = []
	if n % 2 == 0:
		c = 0
		while n % 2 == 0:
			c += 1
			n /= 2
		p.append(c)
	for i in range(3, int(n ** 0.5) + 1, 2):
		if n % i == 0:
			c = 0
			while n % i == 0:
				c += 1
				n /= i
			p.append(c)
	if n != 1:
		p.append(1)
	return p
N = int(input())
p = f(N)
r = 0
while p:
	r += int(((8 * p.pop() + 1) ** 0.5 - 1) / 2)
print(r)


N = int(input())
fn = N
li = [0] * (10 ** 6 + 100)
flag = False
if N == 1:
	print(0)
	exit()
for i in range(2, int(N ** 0.5) + 1):
	while N % i == 0:
		flag = True
		N /= i
		li[i] += 1
if flag == False:
	print(1)
	exit()
ans = 0
if N > fn ** 0.5:
	ans += 1
for count in li:
	use = 1
	while count - use >= 0:
		ans += 1
		count -= use
		use += 1
print(ans)


import math
N = int(input())

def prime_decomposition(x):
	i = 2
	ls = []
	while i * i <= x:
		while x % i == 0:
			x /= i
			ls.append(i)
		i += 1
	if x > 1:
		ls.append(int(x))
	return ls

def counter(n):
	i = 1
	while n > 0.5 * (i + 1) * (i + 2) - 1:
		i += 1
	return i
cnt = 0
numbers = prime_decomposition(N)
set_number = set(numbers)
for i in set_number:
	cnt += counter(numbers.count(i))
print(cnt)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
n = int(input())
soinnsuu = factorization(n)

def get_times(n):
	if n < 3:
		return 1
	elif n < 6:
		return 2
	elif n < 10:
		return 3
	elif n < 15:
		return 4
	elif n < 21:
		return 5
	elif n < 28:
		return 6
	elif n < 36:
		return 7
	elif n < 45:
		return 8
	else:
		return 9
ans = 0
for i in soinnsuu:
	sisuu = i[1]
	ans += get_times(sisuu)
if n == 1:
	print(0)
else:
	print(ans)


import bisect as bi
n = int(input())
ans = 0
summ = [(i + 2) * (i + 1) // 2 for i in range(100000)]
for divide in range(2, int(n ** 0.5) + 1):
	if n == 1:
		break
	cnt = 0
	while n % divide == 0:
		cnt += 1
		n //= divide
	if cnt == 0:
		continue
	ans += bi.bisect_right(summ, cnt)
print(ans + (n != 1))


n = int(input())
d = {}
for k in range(2, 10 ** 6):
	while n % k < 1:
		n //= k
		d[k] = d.get(k, 0) + 1
if n > 1:
	d[n] = 1
a = 0
for i in d.values():
	t = c = 0
	while t + c < i:
		c += 1
		t += c
	a += c
print(a)


N = int(input())
import math
n = int(math.sqrt(N)) + 1
p = []
for i in range(2, n):
	if N % i == 0:
		a = 0
		while N % i == 0:
			N //= i
			a += 1
		p.append([i, a])
if N != 1:
	p.append([N, 1])
ans = 0
l = len(p)
for i in range(l):
	a = p[i][1]
	j = 1
	while a - j >= 0:
		a -= j
		j += 1
		ans += 1
print(ans)


n = int(input())
s = []
for i in range(2, int(n ** 0.5) + 1):
	if n % i == 0:
		p = 0
		while n % i == 0:
			p += 1
			n //= i
		s.append(p)
if n > 1:
	s.append(1)
ans = 0
for i in s:
	r = 1
	while i > 0:
		if i < r:
			break
		i -= r
		r += 1
		ans += 1
print(ans)


n = int(input())

def prime(n):
	dic = {}
	f = 2
	m = n
	while f * f <= m:
		r = 0
		while n % f == 0:
			n //= f
			r += 1
		if r > 0:
			dic[f] = r
		f += 1
	if n != 1:
		dic[n] = 1
	return dic

def counter(dic):
	ans = 0
	for val in dic.values():
		i = 1
		while i * (i + 3) / 2 < val:
			i += 1
		ans += i
	return ans
print(counter(prime(n)))


N = int(input())
F = {}
for i in range(2, int(N ** 0.5) + 1):
	if N % i == 0:
		F[i] = 1
		N //= i
	while N % i == 0:
		N //= i
		F[i] += 1
if N > 1:
	F[N] = 1
ans = 0
for f in F:
	j = 1
	while True:
		F[f] -= j
		j += 1
		if F[f] >= 0:
			ans += 1
		else:
			break
print(ans)


N = int(input())
a = [int(0.5 * i * (i + 1)) for i in range(10)]
import math
res = 0
top = int(math.sqrt(N))
for i in range(2, top + 1):
	count = 0
	while N % i == 0:
		N = N // i
		count += 1
	for j in range(10):
		if count < a[j]:
			res += j - 1
			break
if N != 1:
	print(res + 1)
else:
	print(res)


N = int(input())
ans = 0
for i in range(2, N):
	if i * i > N:
		break
	e = 0
	while N % i == 0:
		e += 1
		N //= i
	if e > 0:
		for j in range(1, 10):
			if e >= j:
				e -= j
				ans += 1
			else:
				break
if N > 1:
	ans += 1
print(ans)


from collections import defaultdict
import math
N = int(input())
ps = defaultdict(int)
for i in range(2, int(math.sqrt(N)) + 1):
	while N % i == 0:
		ps[i] += 1
		N //= i
	i += 1
if N > 1:
	ps[N] += 1
ans = 0
for p in ps:
	k = 1
	while ps[p] >= k:
		ans += 1
		ps[p] -= k
		k += 1
print(ans)


from math import sqrt
N = int(input())
ans = 0
for d in range(2, int(sqrt(N)) + 1):
	if N % d == 0:
		i = 1
		while N % d ** i == 0:
			ans += 1
			N //= d ** i
			i += 1
		while N % d == 0:
			N //= d
if N > 1:
	ans += 1
print(ans)


N = int(input())
import math
if N == 1:
	print(0)
	return

def soinsu(m):
	arr = []
	temp = m
	for i in range(2, int(math.sqrt(m) + 1)):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([m, 1])
	return arr
arr = soinsu(N)
ans = 0
for i in range(len(arr)):
	s = 1
	con = arr[i][1]
	while con >= s:
		ans += 1
		con -= s
		s += 1
print(ans)


def f(i, n):
	ans = 0
	cnt = i
	while n % cnt == 0:
		n //= cnt
		cnt *= i
		ans += 1
	while n % i == 0:
		n //= i
	return (n, ans)
n = int(input())
i = 2
ans = 0
while i <= int(n ** 0.5) + 1:
	if n % i == 0:
		(n, a) = f(i, n)
		ans += a
	i += 1
if n > 1:
	ans += 1
print(ans)


n = int(input())
d = dict()
for i in range(1, int(n ** 0.5) + 1):
	cnt = 0
	while n % (i + 1) == 0:
		n //= i + 1
		cnt += 1
	d[i + 1] = cnt
if n > 1:
	if n in d:
		d[n] += 1
	else:
		d[n] = 1
ans = 0
d = list(d.items())
for (i, r) in d:
	for j in range(1, 44):
		if j * (j + 1) // 2 > r:
			ans += j - 1
			break
print(ans)


def prime_decomposition(n):
	i = 2
	table = []
	while i * i <= n:
		if n % i == 0:
			cnt = 0
			while n % i == 0:
				n //= i
				cnt += 1
			table.append((i, cnt))
		i += 1
	if n > 1:
		table.append((n, 1))
	return table
from itertools import groupby
from collections import Counter
import sys
input = sys.stdin.readline

def main():
	N = int(input())
	ans = 0
	table = prime_decomposition(N)
	for (_, cnt) in table:
		i = 1
		while cnt >= i:
			cnt -= i
			i += 1
			ans += 1
	print(ans)
main()


N = int(input())
ans = 0
d = 2
while d * d <= N:
	e = 0
	while N % d == 0:
		e += 1
		N //= d
	i = 1
	while i <= e:
		ans += 1
		e -= i
		i += 1
	d += 1
if N > 1:
	ans += 1
print(ans)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
n = int(input())
ans = 0
cnt = [0]
for i in range(1, 9):
	for _ in range(i + 1):
		cnt.append(i)
lis = factorization(n)
for (a, b) in lis:
	ans += cnt[b]
if n == 1:
	print(0)
else:
	print(ans)


(a, n) = (0, int(input()))
for i in range(2, 10 ** 6):
	x = j = 0
	while n % i < 1:
		n //= i
		x += 1
	while x > j:
		a += 1
		j += 1
		x -= j
print(a + (n > 1))


import math
N = int(input())
pf = {}
m = N
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
total = 0
for v in pf.values():
	val = int((-1 + math.sqrt(1 + 8 * v)) / 2)
	total += val
print(total)


import math
N = int(input())
p = 2
counter = 0
while N != 1:
	if p > math.sqrt(N):
		counter += 1
		break
	ind = 0
	n = -1
	while N % p == 0:
		N //= p
		ind += 1
	if ind == 0:
		p += 1
		continue
	while (n + 1) * (n + 2) // 2 <= ind:
		n += 1
	counter += n
	p += 1
print(counter)


n = int(input())
a = p = 1
while p < 6 ** 8:
	c = t = 0
	p += 1
	while n % p < 1:
		n //= p
		x = c == t
		t += x
		c += 1 - t * x
		a += x
print(a - (n < 2))


import math
n = int(input())
cnt = 0
for i in range(2, int(math.sqrt(n)) + 1):
	c = 0
	while n % i == 0:
		c += 1
		n //= i
	for j in range(1, c + 1):
		c -= j
		if c < 0:
			break
		cnt += 1
if n != 1:
	cnt += 1
print(cnt)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
N = int(input())
fac = factorization(N)
Answer = 0
for i in range(len(fac)):
	faci = fac[i][1]
	An = 1
	while faci >= An:
		Answer += 1
		faci -= An
		An += 1
if N == 1:
	Answer = 0
print(Answer)


n = int(input())
_n = n
if n == 1:
	print(0)
	exit()
ans = 0
for i in range(2, 10 ** 6 + 9):
	c = i
	while n % c == 0:
		n //= c
		ans += 1
		c *= i
	while n % i == 0:
		n //= i
	if n == 1:
		break
if i < n:
	ans += 1
print(ans)


N = int(input())
if N == 1:
	print(0)
	return

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr

def p_num(m):
	ret = 0
	for j in range(1, 10 ** 12):
		ret += j
		if ret <= m < ret + (j + 1):
			ans = j
			break
	return ans
p = factorization(N)
cnt = 0
for k in range(len(p)):
	cnt += p_num(p[k][1])
print(cnt)


n = int(input())
temp = n
p = 2
res = 0
while p * p <= n:
	if temp % p == 0:
		cnt = 1
		while temp % p ** (cnt + 1) == 0:
			cnt += 1
		res += int((-1 + (1 + 8 * cnt) ** 0.5) // 2)
		temp //= p ** cnt
	p += 1
print(res + (temp != 1))


from collections import defaultdict
N = int(input())

def factorize(N):
	factors = defaultdict(int)
	i = 2
	while i * i <= N:
		factor = 0
		while N % i == 0:
			N //= i
			factor += 1
		if factor > 0:
			factors[i] = factor
		i += 1
	if N > 1:
		factors[N] = 1
	return factors

def to_cnt(n):
	i = 0
	while n >= i + 1:
		n -= i + 1
		i += 1
	return i
ans = 0
for (_, n) in factorize(N).items():
	ans += to_cnt(n)
print(ans)


def f(x):
	c = 1
	while x >= c:
		x -= c
		c += 1
	return c - 1
N = int(input())
ans = 0
for i in range(2, round(N ** 0.5)):
	x = 0
	while N % i == 0:
		x += 1
		N //= i
	if x > 0:
		ans += f(x)
if N > 1:
	ans += 1
print(ans)


from collections import Counter, defaultdict, deque
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
import sys, math, itertools, fractions
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7
INF = float('inf')

def inp():
	return int(sys.stdin.readline())

def inpl():
	return list(map(int, sys.stdin.readline().split()))

def prime_factorize(n):
	if n == 1:
		return [1]
	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
n = inp()
c = Counter(prime_factorize(n))
res = 0
for (k, v) in c.items():
	if k == 1:
		continue
	cnt = 0
	for now in range(1, 150000):
		cnt += now
		if cnt > v:
			res += now - 1
			break
print(res)


from collections import Counter

def factor(n):
	p = []
	if n == 1:
		return p
	m = n
	i = 2
	while i * i <= n:
		while m % i == 0:
			m //= i
			p.append(i)
		i += 1
	if m > 1:
		p.append(m)
	return p
n = int(input())
p = Counter(factor(n))
ans = 0
for x in p.values():
	i = 1
	while x - i >= 0:
		x -= i
		i += 1
		ans += 1
print(ans)


def f(n):
	arr = []
	temp = n
	for c in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % c == 0:
			cnt = 0
			while temp % c == 0:
				cnt += 1
				temp //= c
			arr.append([c, cnt])
	if temp != 1:
		arr.append([temp, 1])
	return arr

def main():
	import math
	import sys
	pin = sys.stdin.readline
	pout = sys.stdout.write
	perr = sys.stderr.write
	N = int(pin())
	r = f(N)
	ans = 0
	for i in r:
		ans += int((math.sqrt(1 + 8 * i[1]) - 1) / 2)
	print(ans)
	return
main()


import collections
n = int(input())
if n == 1:
	print(0)
	exit()
b = int(n ** 0.5)
i = 2
l = []
while i <= b:
	if n % i == 0:
		l.append(i)
		n = n // i
	else:
		i += 1
if n > b:
	l.append(n)
c = collections.Counter(l)
v = list(c.values())
ans = 0
for vv in v:
	wa = 1
	s = 1
	while True:
		if vv < wa:
			break
		s += 1
		wa += s
	ans += s - 1
print(ans)


n = int(input())
fact = {}
for i in range(2, int(n ** 0.5) + 1):
	cnt = 0
	if n % i == 0:
		fact.setdefault(i, 0)
	while n % i == 0:
		fact[i] += 1
		n //= i
if n != 1:
	fact[n] = 1
res = 0
for (p, cnt) in fact.items():
	i = j = 1
	while j <= cnt:
		res += 1
		i += 1
		j += i
print(res)


from collections import defaultdict
from math import sqrt

def main():
	n = int(input())
	wi = 2
	cnt = 0
	d = defaultdict(lambda : 0)
	fi = int(sqrt(1000000000000.0) + 1)
	for i in range(2, fi):
		while n % i == 0:
			d[i] += 1
			n //= i
	if n != 1:
		d[n] = 1
	for val in d.values():
		x = val
		wi = 1
		while x >= wi:
			x -= wi
			wi += 1
			cnt += 1
	print(cnt)

def __starting_point():
	main()
__starting_point()


def p_fact(n):
	m = n
	i = 2
	a = []
	while n > 1:
		if i > m ** 0.5:
			a += [n]
			break
		if n % i == 0:
			n //= i
			a += [i]
		else:
			i += 1
	return a
a = p_fact(int(input()))
d = {}
for i in a:
	if d.get(i):
		d[i] += 1
	else:
		d[i] = 1
ans = 0
for i in d:
	j = 1
	while d[i] - j >= 0:
		ans += 1
		d[i] -= j
		j += 1
print(ans)


import math
N = int(input())
M = int(math.sqrt(N))
ans = 0
check = [True for _ in range(M + 1)]
e = [0 for _ in range(M + 1)]
for p in range(2, M + 1):
	if check[p] == True:
		for j in range(2, M // p + 1):
			check[p * j] = False
		while N % p == 0:
			N = N // p
			e[p] += 1
		ans += int((math.sqrt(1 + 8 * e[p]) - 1) / 2)
if N > 1:
	ans += 1
print(ans)


import math
import numpy as np
n = int(input())
s = math.sqrt(n)
i = 2
f = {}
while i <= s:
	while n % i == 0:
		f[i] = f.get(i, 0) + 1
		n = n // i
	i += 1
ans = 0
for x in f.values():
	e = 0
	cumsum = 0
	while e + cumsum + 1 <= x:
		e += 1
		cumsum += e
	ans += e
print(ans + (n > 1))


I = lambda : list(map(int, input().split()))
(n,) = I()
k = int(n ** 0.5)
i = 2
l = []
while i <= k and n > 1:
	c = 0
	while n % i == 0:
		n //= i
		c += 1
	if c != 0:
		l.append(c)
	i += 1
if n != 1:
	l.append(1)
an = 0
for i in l:
	d = int((2 * i) ** 0.5)
	x = d if (d * d + d) // 2 <= i else d - 1
	an += x
print(an)


N = int(input())
div = 2
dic = {}
while div ** 2 <= N:
	if N % div == 0:
		count = 0
		while N % div == 0:
			N = N // div
			count += 1
		dic[div] = count
	div += 1
if N != 1:
	dic[N] = 1
ans = 0
for v in dic.values():
	tmp = 1
	while v >= tmp:
		v -= tmp
		tmp += 1
		ans += 1
print(ans)


def solve():
	N = n = int(input())
	q = int(n ** 0.5)
	ans = 0
	for d in range(2, q + 1):
		a = 0
		while n % d == 0:
			a += 1
			n //= d
		if a > 0:
			ans += int(((a * 8 + 1) ** 0.5 - 1) / 2)
	if n > 1:
		ans += 1
	return ans
print(solve())


from collections import defaultdict
N = int(input())
soinsu = defaultdict(int)
x = 2
while x <= 10 ** 6:
	while N % x == 0:
		soinsu[x] += 1
		N //= x
	x += 1
if N > 1:
	soinsu[N] += 1
ans = 0
for key in soinsu.keys():
	x = 1
	while soinsu[key] >= x:
		ans += 1
		soinsu[key] -= x
		x += 1
print(ans)


import math
n = int(input())
tmp = int(math.sqrt(n)) + 1
ans = 0
for num in range(2, tmp):
	count = 0
	while n % num == 0:
		n //= num
		count += 1
	ans += int(math.sqrt(2 * count + 0.25) - 0.5)
if n != 1:
	ans += 1
print(ans)


from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(2, int(n ** 0.5) + 1):
	while n % i == 0:
		n //= i
		d[i] += 1
if n > 1:
	d[n] += 1
ans = 0
for i in d.values():
	val = 1
	while i >= val:
		i -= val
		ans += 1
		val += 1
print(ans)


import math
n = int(input())
ans = 0
k = int(math.sqrt(n)) + 1
for i in range(2, k):
	p = 1
	while n % i ** p == 0:
		ans += 1
		n = n // i ** p
		p += 1
	while n % i == 0:
		n //= i
	if n < i:
		break
if n != 1:
	ans += 1
print(ans)


import math
n = int(input())
pf = []
for i in range(2, math.ceil(n ** 0.5) + 1):
	temp = 0
	while n % i == 0:
		n /= i
		temp += 1
	if temp:
		pf.append(temp)
	if n == 1:
		break
if n != 1:
	pf.append(1)
ans = 0
for i in range(len(pf)):
	j = 1
	while pf[i] - j >= 0:
		ans += 1
		pf[i] -= j
		j += 1
print(ans)


from fractions import gcd
from itertools import combinations, permutations, accumulate, product
from collections import deque, defaultdict, Counter
import decimal
import re
import math
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7
from sys import stdin
readline = stdin.readline

def readInts():
	return list(map(int, readline().split()))

def readTuples():
	return tuple(map(int, readline().split()))

def I():
	return int(readline())
n = I()

def soinsu(n):
	dic = defaultdict(int)
	i = 2
	while i * i <= n:
		if n % i == 0:
			dic[i] += 1
			n //= i
		else:
			i += 1
	if n != 1:
		dic[n] += 1
	return dic
dic = soinsu(n)
ans = 0
for (k, v) in list(dic.items()):
	i = 1
	while True:
		if v >= i:
			ans += 1
			v -= i
			i += 1
		else:
			break
print(ans)


from math import floor
from math import sqrt
N = int(input())

def f(x):
	return floor((-1 + sqrt(1 + 8 * x)) / 2.0)
ans = 0
i = 2
while N > 1:
	x = 0
	while N % i == 0:
		N = N // i
		x = x + 1
	if x != 0:
		ans = ans + f(x)
	i = i + 1
	if i > 10 ** 6:
		ans = ans + 1
		break
print(ans)


N = int(input())

def prime_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
l = prime_factorize(N)
L = set(l)
z = 0
for j in L:
	i = 1
	while i * (i + 1) // 2 <= l.count(j):
		i += 1
	z += i - 1
print(z)


from collections import Counter

def prime_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
n = int(input())
l = prime_factorize(n)
c = Counter(l)
v = c.values()
ans = 0
for i in v:
	a = 0
	for j in range(1, 1000000):
		a += j
		if a > i:
			ans += j - 1
			break
print(ans)


from math import sqrt
pf = {}
m = int(input())
for i in range(2, int(m ** 0.5) + 1):
	while m % i == 0:
		pf[i] = pf.get(i, 0) + 1
		m //= i
if m > 1:
	pf[m] = 1
cnt = 0
calc = lambda n: (sqrt(8 * n + 1) - 1) // 2
for i in pf:
	cnt += calc(pf[i])
print(int(cnt))


def factorize(n):
	fct = []
	(b, e) = (2, 0)
	while b * b <= n:
		while n % b == 0:
			n = n // b
			e += 1
		if e > 0:
			fct.append(e)
		(b, e) = (b + 1, 0)
	if n > 1:
		fct.append(1)
	return fct
n = int(input())
ans = 0
for i in factorize(n):
	count = 1
	while i >= count:
		ans += 1
		i -= count
		count += 1
print(ans)


N = int(input())
ans = 0
n = N
for i in range(2, int(N ** 0.5) + 1):
	if n % i == 0:
		list1 = []
		while n % i == 0:
			list1.append(i)
			n //= i
		x = len(list1)
		ans += int(-0.5 + (1 + 8 * x) ** 0.5 * 0.5)
if n != 1:
	ans += 1
if ans == 0 and N != 1:
	ans = 1
print(ans)


n = int(input())
ans = 0
p = 2
while p <= 10 ** 6 and n != 1:
	dv = 0
	wa = 1
	num = 1
	while n % p == 0:
		n /= p
		n = int(n)
		dv += 1
	if dv > 0:
		while dv >= wa:
			num += 1
			wa += num
		num -= 1
		ans += num
	p += 1
if n != 1:
	print(str(ans + 1))
	exit()
print(str(ans))


from collections import defaultdict
n = int(input())
num = 2
d = defaultdict(int)
while num * num <= n:
	while n % num == 0:
		n //= num
		d[num] += 1
	num += 1
if n != 1:
	d[n] += 1
ans = 0
for v in d.values():
	mn = 1
	while v >= mn:
		v -= mn
		ans += 1
		mn += 1
print(ans)


from math import sqrt
N = int(input())
M = N
p = 2
ans = 0
while p <= sqrt(M):
	z = p
	while N % z == 0:
		N //= z
		z *= p
		ans += 1
	while N % p == 0:
		N //= p
	p += 1
if N > 1:
	ans += 1
print(ans)


import collections
import bisect

def prime_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
N = int(input())
c = collections.Counter(prime_factorize(N))
sums = []
s = 1
ans = 0
for v in c.values():
	count = 0
	for i in range(1, v + 1):
		if count + i > v:
			break
		else:
			count += i
			ans += 1
print(ans)


import collections
n = int(input())
a = []
count = 0
while n % 2 == 0:
	a.append(2)
	n = n / 2
num = 3
while num ** 2 <= n + 1:
	if n % num == 0:
		a.append(num)
		n = n / num
	else:
		num += 2
if n != 1:
	a.append(n)
a = collections.Counter(a)
for i in a.values():
	x = 1
	while x <= i:
		count += 1
		i -= x
		x += 1
print(count)


n = int(input())
p = dict()
for i in range(2, 10 ** 6 + 1):
	if n % i == 0:
		p[i] = 1
		n //= i
		while n % i == 0:
			p[i] += 1
			n //= i
if n != 1:
	p[n] = 1
ans = 0
for v in p.values():
	res = 0
	cnt = 1
	while v >= cnt:
		res += 1
		v -= cnt
		cnt += 1
	ans += res
print(ans)


def main():
	from collections import deque

	def prime_factorization_list(n: int):
		fct = []
		b = 2
		while b * b <= n:
			while n % b == 0:
				n //= b
				fct.append(b)
			b += 1
		if n > 1:
			fct.append(n)
		return fct
	N = int(input())
	q = deque(prime_factorization_list(N))
	memo = []
	while q:
		p = q.popleft()
		res = p
		while res in memo and q:
			can = q.popleft()
			if can == p:
				res *= can
			else:
				res = can
				break
		if res not in memo:
			memo.append(res)
	print(len(memo))

def __starting_point():
	main()
__starting_point()


N = int(input())
D = {}
for k in range(2, 10 ** 6):
	while N % k < 1:
		N //= k
		D[k] = D.get(k, 0) + 1
a = 0
for i in D.values():
	t = 0
	c = 0
	while t + c < i:
		c += 1
		t += c
	a += c
print(a + (N > 1))


import bisect
n = int(input())
if n == 1:
	print(0)
	return

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 ra(a):
	(ll, l) = ([], 1)
	for i in range(len(a) - 1):
		if a[i] == a[i + 1]:
			l += 1
		else:
			ll.append(l)
			l = 1
	ll.append(l)
	return ll
l = ra(factorize(n))
c = [1]
for i in range(2, 10 ** 4):
	c.append(i + c[-1])
ans = 0
for i in l:
	ans += bisect.bisect_left(c, i)
	if i in set(c):
		ans += 1
print(ans)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr

def abc169d_div_game():
	n = int(input())
	arr = factorization(n)
	cnt = 0
	for (p, e) in arr:
		if p == 1:
			continue
		for i in range(1, e + 1):
			if e >= i:
				cnt += 1
				e -= i
			else:
				break
	print(cnt)
abc169d_div_game()


import bisect
N = int(input())
ans = 0
i = 2
a = [j * (j + 1) // 2 for j in range(64)]
while i * i <= N:
	cnt = 0
	while N % i == 0:
		N //= i
		cnt += 1
	ans += bisect.bisect_right(a, cnt) - 1
	i += 1
if N > 1:
	ans += 1
print(ans)


def f(n):
	res = 0
	s = 0
	for i in range(1, n + 1):
		s += i
		if s <= n:
			res = i
		else:
			break
	return res
n = int(input())
p = 2
ans = 0
while p * p <= n:
	e = 0
	while n % p == 0:
		e += 1
		n //= p
	ans += f(e)
	p += 1
if n > 1:
	ans += 1
print(ans)


import math
l = []
n = int(input())
for i in range(2, int(math.sqrt(n)) + 1):
	flg = 0
	while n % i == 0:
		if flg == 0:
			l.append(1)
			flg = 1
		else:
			l[-1] += 1
		n = n // i
if n != 1:
	l.append(1)
ans = 0
for i in range(len(l)):
	c = 1
	while l[i] - c >= 0:
		l[i] -= c
		c += 1
		ans += 1
print(ans)


import math
import sys

class Graph:

	def __init__(self, Nodes, is_directed=False):
		self.nodes = Nodes
		self.adj_list = {}
		self.is_directed = is_directed
		for node in self.nodes:
			self.adj_list[node] = []

	def add_edge(self, u, v):
		self.adj_list[u].append(v)
		if self.is_directed == False:
			self.adj_list[v].append(u)

	def print_graph(self):
		for node in self.nodes:
			print((node, '->', self.adj_list[node]))

	def degree_node(self, node):
		return len(self.adj_list[node])

	def dfsUTIL(self, v, visited, parents=[]):
		visited[v] = True
		for i in self.adj_list[v]:
			if visited[i] == False:
				self.dfsUTIL(i, visited, parents)
				parents.append(i)

	def dfs(self, v):
		visited = [False] * (max(self.adj_list) + 1)
		parents = [v]
		self.dfsUTIL(v, visited, parents)
		return len(parents)

def dict_sort(ans):
	ans = sorted(list(ans.items()), reverse=True, key=lambda kv: kv[1])

def is_prime(n):
	if n == 1:
		return 0
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			return False
	return True

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def seive_primes(n):
	flag = [0] * (n + 10)
	flag[1] = flag[0] = 1
	i = 2
	while i * i <= n + 1:
		if flag[i] == 0:
			j = i * i
			while j <= n + 1:
				flag[j] = 1
				j += i
		i += 1
	return flag

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // gcd(a, b)

def alphabates():
	return 'abcdefghijklmnopqrstuvwxyz'

def binary_search(ls, n, flag):
	low = 0
	hi = n - 1
	while low <= hi:
		mid = (low + hi) // 2
		if ls[mid] == flag:
			return mid
		elif ls[mid] > flag:
			hi = mid - 1
		else:
			low = mid + 1
	return -1

def qdrt(a, b, c):
	chk = b * b - 4 * a * c
	if chk >= 0:
		ans1 = (-b + chk ** 0.5) / (2 * a)
		ans2 = (-b - chk ** 0.5) / (2 * a)
		return [int(ans1), int(ans2)]
	return -1

def inp():
	ls = list(map(int, input().split()))
	return ls

def mult_inp():
	return list(map(int, input().split()))
n = int(input())
d = {}
while n % 2 == 0:
	if 2 in d:
		d[2] += 1
	else:
		d[2] = 1
	n /= 2
for i in range(3, int(n ** 0.5) + 1, 2):
	while n % i == 0:
		if i in d:
			d[i] += 1
		else:
			d[i] = 1
		n /= i
n = int(n)
if n > 1:
	d[n] = 1
n = 1
ans = 0
for i in d:
	c = -2 * d[i]
	a = b = 1
	ls = qdrt(a, b, c)
	if ls[0] >= 0:
		ans += ls[0]
	elif ls[1] >= 0:
		ans += ls[1]
print(ans)


n = int(input())
a = []
ans = 0
for i in range(2, n):
	if i * i > n:
		break
	x = 0
	while n % i == 0:
		n //= i
		x += 1
	a.append(x)
if n != 1:
	ans += 1
for i in a:
	b = 1
	while b <= i:
		i -= b
		b += 1
		ans += 1
print(ans)


N = int(input())
things = []
c = N
for i in range(2, c):
	if i * i > N:
		break
	count = 0
	if c % i == 0:
		while c % i == 0:
			c //= i
			count += 1
		things.append(count)
if c > 1:
	things.append(1)
final = 0
for x in things:
	count = 0
	start = 1
	step = 2
	while start <= x:
		start += step
		step += 1
		count += 1
	final += count
print(final)


import math
N = int(input())

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
res = factorization(N)
li = [0] * 101
for i in range(1, 101):
	li[i] = li[i - 1] + i
ans = 0
for r in res:
	if r[0] == 1:
		continue
	i = 0
	while li[i] <= r[1]:
		i += 1
	ans += i - 1
print(ans)


a = int(input())
ans = 0
tmp = 2
while tmp * tmp <= a:
	ct = 0
	while not a % tmp:
		ct += 1
		a /= tmp
	for i in range(1, ct + 1):
		if (1 + i) * i / 2 <= ct:
			ans += 1
		else:
			break
	tmp += 1
if a != 1:
	ans += 1
print(ans)


from math import sqrt
n = int(input())
p = n
count = 0
for i in range(2, int(sqrt(n)) + 1):
	e = 1
	while n % i ** e == 0:
		n //= i ** e
		count += 1
		e += 1
	if n % i == 0:
		while n % i == 0:
			n //= i
if n != 1:
	count += 1
if count == 0 and p != 1:
	count = 1
print(count)


n = int(input())
M = 10 ** 6 + 1
l = []
p = [1] * M
for i in range(2, M):
	if p[i]:
		l += [i]
		for j in range(2 * i, M, i):
			p[j] = 0
d = {}
for k in l:
	c = 0
	while n % k == 0:
		n //= k
		c += 1
	if c > 0:
		d[k] = c
s = [1]
for i in range(2, 9):
	s.append(s[-1] + i)
a = 0
for i in d.values():
	for j in s:
		if j > i:
			break
		a += 1
print(a + (n > 1))


import collections

def prime_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 f(n):
	for i in range(1, 20):
		if n < i * (i + 1) // 2:
			return i - 1
n = int(input())
c = collections.Counter(prime_factorize(n))
ans = 0
for i in c.keys():
	ans += f(c[i])
print(ans)


n = int(input())
primes = dict()
p = 2
while p * p < n:
	if n % p == 0:
		primes[p] = 0
		while n % p == 0:
			n //= p
			primes[p] += 1
	p += 1
if p * p == n:
	primes[p] = 2
elif n >= p:
	primes[n] = 1
count = 0
for e in primes.values():
	c = 1
	while c * (c + 1) // 2 <= e:
		c += 1
	count += c - 1
print(count)


from math import sqrt
n = int(input())
cnt = 0
for i in range(2, int(sqrt(n))):
	if n % i == 0:
		div = i
		while n % div == 0:
			n /= div
			div *= i
			cnt += 1
		while n % i == 0:
			n /= i
if n > 1:
	cnt += 1
print(cnt)


from collections import defaultdict
N = int(input())
if N == 1:
	print(0)
	return
p = defaultdict(int)
while N % 2 == 0:
	p[2] += 1
	N //= 2
f = 3
while f * f <= N:
	if N % f == 0:
		p[f] += 1
		N //= f
	else:
		f += 2
if N != 1:
	p[N] += 1
ans = 0
for v in p.values():
	n = 1
	i = 1
	while n <= v:
		ans += 1
		i += 1
		n += i
print(ans)


n = int(input())
from collections import Counter
factors = []
i = 2
while n > 1:
	if n < i * i:
		factors.append(n)
		break
	while n % i == 0:
		factors.append(i)
		n //= i
	i += 1
ans = 0
for cnt in Counter(factors).values():
	i = 1
	while cnt >= i:
		cnt -= i
		i += 1
		ans += 1
print(ans)


from collections import defaultdict
n = int(input())
d = defaultdict(int)
while n % 2 == 0:
	n //= 2
	d[2] += 1
f = 3
while f * f <= n:
	if n % f == 0:
		n //= f
		d[f] += 1
	else:
		f += 2
if n != 1:
	d[n] += 1
c = 0
for (k, v) in d.items():
	i = 1
	while v >= i:
		v -= i
		c += 1
		i += 1
print(c)


from collections import defaultdict
import math
n = int(input())
primes = defaultdict(int)
t = n
for i in range(2, int(math.sqrt(n)) + 1):
	while t % i == 0:
		primes[i] += 1
		t //= i
if t != 1:
	primes[t] += 1
count = 0
for cn in primes.values():
	count += int((-1 + math.sqrt(1 + 8 * cn)) / 2)
print(count)


def prime_factorize(n):
	primes = []
	for i in range(2, int(n ** (1 / 2)) + 1):
		if n % i != 0:
			continue
		num = 0
		while n % i == 0:
			num += 1
			n //= i
		primes.append([i, num])
	if n != 1:
		primes.append([n, 1])
	return primes
N = int(input())
prime_list = prime_factorize(N)
ans = 0
for (_, e) in prime_list:
	now = 1
	work = e
	while work >= now:
		work -= now
		now += 1
		ans += 1
print(ans)


N = int(input())
ans = 0
for i in range(2, int(N ** (1 / 2) // 1) + 1):
	if N % i == 0:
		cnt = 0
		while N % i == 0:
			N //= i
			cnt += 1
		for j in range(1, cnt + 1):
			if cnt - j >= 0:
				cnt -= j
				ans += 1
			else:
				break
	else:
		continue
if N != 1:
	ans += 1
print(ans)


import copy
n = int(input())

def prime_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
L = prime_factorize(n)
M = L.copy()
M = list(set(M))
cnt = 0
for x in M:
	m = L.count(x)
	for i in range(L.count(x)):
		if m - i - 1 >= 0:
			m -= i + 1
			cnt += 1
print(cnt)


N = int(input())
ans = 0
d = 2
while d * d <= N:
	if N % d == 0:
		z = d
		while N % z == 0:
			N /= z
			ans += 1
			z *= d
		while N % d == 0:
			N /= d
	d += 1
if N > 1:
	ans += 1
print(ans)


import math
N = int(input())
L = []
for i in range(2, int(math.sqrt(N))):
	if N % i == 0:
		c = 0
		while N % i == 0:
			N /= i
			c += 1
		L.append(c)
if N != 1:
	L.append(1)
ans = 0
for i in L:
	for n in range(10):
		if n * (n + 1) // 2 > i:
			ans += n - 1
			break
print(ans)


from bisect import bisect
from itertools import accumulate as acc
N = int(input())
d = dict()
for i in range(2, int(N ** (1 / 2)) + 2):
	if N % i == 0:
		d[i] = 0
	while N % i == 0:
		d[i] += 1
		N //= i
if N != 1:
	d[N] = 1
a = list(acc(range(1, 100)))
r = 0
for v in d.values():
	r += bisect(a, v)
print(r)


def factrize(num):
	factor = {}
	div = 2
	s = int(num ** 0.5) + 1
	while div < s:
		div_cnt = 0
		while num % div == 0:
			div_cnt += 1
			num //= div
		if div_cnt != 0:
			factor[div] = div_cnt
		div += 1
	if num > 1:
		factor[num] = 1
	return factor
n = int(input())
cnt = factrize(n)
ans = 0
for c in cnt.values():
	tmp = 1
	while c >= tmp:
		c -= tmp
		ans += 1
		tmp += 1
print(ans)


n = int(input())
from collections import Counter
f = Counter()
factors = []
for i in range(2, min(int(n ** 0.5 + 1), n + 1)):
	if n % i == 0:
		factors.append(i)
		factors.append(n // i)
factors.sort()
for factor in factors:
	while n % factor == 0:
		n //= factor
		f[factor] += 1

def bsearch(test, lo, hi):
	while lo != hi:
		mid = (lo + hi + 1) // 2
		if test(mid):
			lo = mid
		else:
			hi = mid - 1
	return lo
ans = 0
for (p, q) in list(f.items()):
	ans += bsearch(lambda w: w * (w + 1) // 2 <= q, 0, 10 ** 12)
if ans == 0 and n > 1:
	print(1)
else:
	print(ans)


def prime_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
n = int(input())
np = set(prime_factorize(n))
npl = []
for i in np:
	j = 1
	j *= i
	while j <= n:
		npl.append(j)
		j *= i
npl.sort()
cz = 2
ans = 0
for cz in npl:
	if cz > n:
		break
	if n % cz == 0:
		ans += 1
		n //= cz
print(ans)


import math
from collections import defaultdict
from itertools import accumulate
N = int(input())
data = defaultdict(int)
result = 0
for i in range(2, int(math.sqrt(N)) + 1):
	while N % i == 0:
		N //= i
		data[i] += 1
if N != 1:
	data[N] += 1
cumsum = list(accumulate(range(1, 10 ** 6 * 2)))
for value in data.values():
	for i in range(10 ** 6 * 2):
		if value < cumsum[i]:
			result += i
			break
if result == 0:
	if N != 1:
		result = 1
print(result)


n = int(input())

def fact(n):
	fct = []
	(b, e) = (2, 0)
	while b * b <= n:
		while n % b == 0:
			n = n // b
			e = e + 1
		if e > 0:
			fct.append([b, e])
		(b, e) = (b + 1, 0)
	if n > 1:
		fct.append([n, 1])
	return fct
x = fact(n)
ans = 0
for i in range(len(x)):
	for j in range(1, 1000):
		if x[i][1] >= j:
			ans += 1
			x[i][1] -= j
print(ans)


n = int(input())
ans = 0
i = 2
while i * i <= n:
	cnt = 0
	while n % i == 0:
		n //= i
		cnt += 1
	j = 0
	for k in range(1, cnt + 1):
		if k * (k + 1) // 2 <= cnt:
			j = max(j, k)
	ans += j
	i += 1
if n > 1:
	ans += 1
print(ans)


n = int(input())
prime = list()
i = 2
while i * i <= n:
	if n % i == 0:
		cnt = 0
		while n % i == 0:
			cnt += 1
			n //= i
		prime.append(cnt)
	i += 1
if n != 1:
	prime.append(1)
ans = 0
for x in prime:
	a = 1
	while a * (a + 1) // 2 <= x:
		a += 1
	ans += a - 1
print(ans)


N = int(input())
a = {}
c = 0
while N % 2 == 0:
	N //= 2
	c += 1
if c != 0:
	a[2] = c
(f, c) = (3, 0)
while f * f <= N:
	if N % f == 0:
		N //= f
		c += 1
		a[f] = c
	else:
		f += 2
		c = 0
if N != 1:
	if N in a:
		a[N] += 1
	else:
		a[N] = 1
t = 0
for v in a.values():
	i = 1
	while v >= i:
		t += 1
		v -= i
		i += 1
print(t)


N = int(input())
primes = {}
for num in range(2, int(N ** 0.5) + 1):
	while N % num == 0:
		if num in primes:
			primes[num] += 1
		else:
			primes[num] = 1
		N //= num
ans = 0
for p in primes.values():
	n = 1
	while n * (n + 1) // 2 <= p:
		n += 1
	ans += n - 1
if N > 1:
	ans += 1
print(ans)


import math
n = int(input())
ans = 0
for i in range(2, int(math.sqrt(n) + 1)):
	if n % i == 0:
		prime = i
		power = 0
		while n % i == 0:
			n = n // i
			power += 1
		st = 1
		while st <= power:
			ans += 1
			power -= st
			st += 1
if n > 1:
	ans += 1
print(ans)


n = int(input())
d = {2: 0}
while n % 2 < 1:
	n //= 2
	d[2] += 1
for i in range(3, int(n ** 0.5) + 1, 2):
	while n % i < 1:
		n //= i
		d[i] = d.get(i, 0) + 1
	if n < 2:
		break
if n > 1:
	d[n] = 1
a = 0
for i in d.values():
	t = c = 0
	while t + c < i:
		c += 1
		t += c
	a += c
print(a)


N = int(input())
if N == 1:
	print(0)
	return

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
ans = 0
l = factorization(N)
for (i, j) in l:
	k = 1
	while j >= k:
		ans += 1
		j -= k
		k += 1
print(ans)


from collections import Counter

def factor(n):
	res = []
	for i in range(2, int(n ** 0.5) + 1):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 1:
		return res + [n]
	else:
		return res
N = int(input())
ps = factor(N)
sq = [i * (i + 1) // 2 for i in range(100)]
ans = 0
for (k, v) in list(Counter(ps).items()):
	for i in range(99):
		if sq[i] <= v < sq[i + 1]:
			ans += i
			break
print(ans)


n = int(input())

def f(x):
	z = 1
	while not z * (z + 1) <= 2 * x < (z + 1) * (z + 2):
		z += 1
	return z
x = [-1] * (10 ** 6 + 1)
x[0] = 0
x[1] = 1
i = 2
prime = []
while i <= 10 ** 6:
	if x[i] == -1:
		x[i] = i
		prime.append(i)
	for j in prime:
		if i * j > 10 ** 6 or j > x[i]:
			break
		x[j * i] = j
	i += 1
if n == 1:
	print(0)
	return
a = []
q = 0
for i in range(len(prime)):
	p = prime[i]
	while n % p == 0:
		q += 1
		n = n // p
	if q > 0:
		a.append(q)
	q = 0
ans = 0
for i in range(len(a)):
	ans += f(a[i])
print(ans if n == 1 else ans + 1)


import collections
n = int(input())

def prime_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
if n == 1:
	print(0)
	return
c = collections.Counter(prime_factorize(n))
(_, counts) = list(zip(*c.most_common()))
l = list(counts)
ans = 0
if l == [1]:
	print(1)
	return
for i in l:
	for j in range(1, i + 1):
		if i >= j:
			i -= j
			ans += 1
print(ans)


import sys
input = sys.stdin.readline
n = int(input())

def soinsuu(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
from collections import Counter
a = Counter(soinsuu(n))
if n == 1:
	print(0)
	return
cnt = 0
for i in range(1, 1 + max(a.values())):
	for item in a.keys():
		if n % item ** i == 0:
			n //= item ** i
			cnt += 1
			if n == 1:
				break
print(cnt)


n = int(input())
res = 0
from bisect import bisect_right
aa = [j * (j + 1) // 2 for j in range(1, 22)]
for i in range(2, 10 ** 6):
	if n % i == 0:
		cnt = 0
		while n % i == 0:
			n = n // i
			cnt += 1
		res += bisect_right(aa, cnt)
	if n == 1:
		break
else:
	res += 1
print(res)


N = int(input())
M = N
pf = []
K = 2
while K * K <= M:
	while N % K == 0:
		pf.append(K)
		N = N // K
	K += 1
if N != 1:
	pf.append(N)
ans = 0
for i in set(pf):
	C = pf.count(i)
	for j in range(20):
		if j * (j + 1) // 2 <= C < (j + 1) * (j + 2) // 2:
			ans += j
print(ans)


import math
n = int(input())
m = n
answer = 0
i = 2
while i ** 2 <= m:
	t = 0
	while n % i == 0:
		n //= i
		t += 1
	answer += int((-1 + math.sqrt(1 + 8 * t)) / 2)
	i += 1
if n > 1000000:
	answer += 1
print(answer)


N = int(input())
ans = 0
p = 2
while N > 1 and p * p <= N:
	if N % p == 0:
		c = 0
		while N % p == 0:
			N = N / p
			c = c + 1
		Y = 1
		U = 2
		while c >= Y:
			ans = ans + 1
			Y = Y + U
			U = U + 1
	p = p + 1
if N > 1:
	ans = ans + 1
print(ans)


n = int(input())
a = set()
i = 2
res = 0
while i * i <= n:
	if n % i == 0:
		count = 0
		while n % i == 0:
			count += 1
			n //= i
		dif = 1
		while count >= dif:
			res += 1
			count -= dif
			dif += 1
	i += 1
if n != 1:
	res += 1
print(res)


def II():
	return int(input())
N = II()
d = 2
ans = 0
while d * d <= N:
	if N % d != 0:
		d += 1
		continue
	z = d
	while N % z == 0:
		ans += 1
		N //= z
		z *= d
	while N % d == 0:
		N //= d
if N != 1:
	ans += 1
print(ans)


from collections import Counter
from itertools import accumulate
from bisect import bisect_right

def factor(n):
	res = []
	for i in range(2, int(n ** 0.5) + 1):
		while n % i == 0:
			res.append(i)
			n //= i
	if n > 1:
		return res + [n]
	else:
		return res
num = [i for i in range(1, 65)]
num = list(accumulate(num))
N = int(input())
primes = Counter(factor(N))
ans = 0
for v in list(primes.values()):
	ans += bisect_right(num, v)
print(ans)


(a, n) = (0, int(input()))
for i in range(2, int(n ** 0.5 + 1)):
	x = 0
	while n % i == 0:
		n //= i
		x += 1
	j = 1
	while x >= j:
		a += 1
		x -= j
		j += 1
print(a + (n > 1))


n = int(input())
a = []
ans = 0
for i in range(2, int(n ** 0.5) + 1):
	count = 0
	while n % i == 0:
		n /= i
		count += 1
	if count != 0:
		for j in range(1, count + 10):
			if j * (j + 1) / 2 > count:
				ans += j - 1
				break
if n != 1:
	ans += 1
print(ans)


N = int(input())
p = []
r = 0
if N % 2 == 0:
	c = 0
	while N % 2 == 0:
		c += 1
		N /= 2
	p.append([c])
i = 3
while i < N ** 0.5 + 1:
	if N % i == 0:
		c = 0
		while N % i == 0:
			c += 1
			N /= i
		p.append([c])
	i += 2
if N != 1:
	p.append([1])
for i in range(len(p)):
	j = 1
	while p[i][0] >= j:
		p[i][0] -= j
		j += 1
		r += 1
print(r)


n = int(input())
temp = []
for i in range(2, int(n ** 0.5) + 2):
	if n % i == 0:
		temp.append([i, 0])
		while n % i == 0:
			n /= i
			temp[-1][1] += 1
else:
	if n != 1:
		temp.append([n, 1])
ans = 0
for i in range(len(temp)):
	count = 1
	while temp[i][1] >= count:
		ans += 1
		temp[i][1] -= count
		count += 1
if len(temp) == 0:
	print(0)
else:
	print(ans)


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
n = int(input())
nf = factorization(n)
ans = 0
if n == 1:
	print(ans)
else:
	for i in nf:
		q = i[1]
		c = 1
		while q > 0:
			ans += 1
			c += 1
			q -= c
	print(ans)


n = int(input())
r = 0
i = 2
while i * i <= n:
	j = k = 1
	while n % i == 0:
		n //= i
		j -= 1
		if j == 0:
			r += 1
			j = k = k + 1
	i += 1
print(r + (n > 1))


def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
N = int(input())
L = factorization(N)
a = 0
for (p, e) in L:
	if p == 1:
		continue
	t = 1
	while t <= e:
		a += 1
		e -= t
		t += 1
print(a)


import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

def prime_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
INF = inf
MOD = 1000000007
n = int(input())
tmp = 0
res = 0
cnt = Counter(prime_factorize(n))
for i in list(cnt.values()):
	res += floor((-1 + sqrt(1 + 8 * i)) / 2)
print(res)


N = int(input())
pri_cnt = {}
n = N
i = 2
while i ** 2 <= N:
	while n % i == 0:
		if i not in pri_cnt:
			pri_cnt[i] = 1
		else:
			pri_cnt[i] += 1
		n = n / i
	if i == 2:
		i += 1
	else:
		i += 2
if n > 1:
	pri_cnt[int(n)] = 1
ans = 0
for (pri, cnt) in pri_cnt.items():
	count = 1
	remain = cnt
	while remain >= count:
		ans += 1
		remain -= count
		count += 1
print(ans)


N = int(input())
pair = dict()
ans = 0
for a in range(2, int(N ** (1 / 2))):
	if N % a != 0:
		continue
	ex = 0
	while N % a == 0:
		ex += 1
		N = N // a
	pair[a] = ex
if N != 1:
	pair[N] = 1
for k in pair.values():
	i = 1
	while k >= i:
		ans += 1
		k -= i
		i += 1
print(ans)


n = int(input())
ans = 0
i = 2
while n > 1 and i * i <= n:
	if n % i == 0:
		c = 0
		while n % i == 0:
			n = n / i
			c += 1
		j = 1
		while c >= j:
			ans = ans + 1
			c -= j
			j += 1
	i = i + 1
if n > 1:
	ans = 1 + ans
print(ans)


N = int(input())
nn = N
import math
sq = round(math.sqrt(N)) + 1
i = 2
ans = 0
count1 = 0
count2 = 1
while sq >= i:
	if nn % i == 0:
		nn //= i
		count1 += 1
		if count1 == count2:
			ans += 1
			count2 += 1
			count1 = 0
	else:
		i += 1
		count1 = 0
		count2 = 1
if nn > sq:
	ans += 1
print(ans)


N = int(input())
f = {}
p = 2
while p * p <= N:
	if N % p == 0:
		f[p] = 0
	while N % p == 0:
		N //= p
		f[p] += 1
	p += 1
if N > 1:
	f[N] = 1
ans = 0
for v in f.values():
	n = s = 0
	while s <= v:
		n += 1
		s += n
	ans += n - 1
print(ans)


N = int(input())

def divisor(x):
	div = []
	for i in range(1, int(x ** (1 / 2)) + 1):
		if x % i == 0:
			div.append(i)
			if i != x // i:
				div.append(x // i)
	return sorted(div)

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(n ** (1 / 2)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
zt = [1]
ans = 0
while N > 1:
	for i in divisor(N):
		if i not in zt:
			if len(factorization(i)) == 1:
				z = i
				zt.append(z)
				break
	if z == 0:
		break
	N = N // z
	ans += 1
	z = 0
print(ans)


N = int(input())
arr = []
temp = N
for i in range(2, int(N ** 0.5 // 1 + 1)):
	if temp % i == 0:
		cnt = 0
		while temp % i == 0:
			cnt += 1
			temp = temp // i
		arr.append(cnt)
if temp != 1:
	arr.append(1)
if arr == [] and N != 1:
	arr.append(1)
ans = 0
for i in range(len(arr)):
	for n in range(1, 100):
		if arr[i] >= n:
			ans += 1
			arr[i] -= n
		else:
			break
print(ans)


from math import sqrt
n = int(input())
ans = 0
for i in range(2, 1 + int(sqrt(n))):
	c = 0
	while n % i == 0:
		n //= i
		c += 1
	ans += int((-1 + sqrt(1 + 8 * c)) / 2)
if n != 1:
	ans += 1
print(ans)


n = int(input())
ans = 0
for i in range(2, int(n ** 0.5) + 1):
	x = i
	while n % x == 0:
		n = n // x
		x *= i
		ans += 1
	while n % i == 0:
		n = n // i
if n != 1:
	ans += 1
print(ans)


n = int(input())
ans = 0
i = 2
num = n
while i * i <= n:
	cnta = 0
	cntb = 0
	while num % i == 0:
		num //= i
		if cnta == cntb:
			ans += 1
			cnta = 0
			cntb += 1
		else:
			cnta += 1
	i += 1
if ans == 0 and n != 1 or num != 1:
	ans += 1
print(ans)


N = int(input())

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
		if temp % i == 0:
			cnt = 0
			while temp % i == 0:
				cnt += 1
				temp //= i
			arr.append([i, cnt])
	if temp != 1:
		arr.append([temp, 1])
	if arr == []:
		arr.append([n, 1])
	return arr
ans = 0
soinsu_list = factorization(N)
for i in range(len(soinsu_list)):
	cnt = 0
	while soinsu_list[i][0] != 1:
		cnt += 1
		soinsu_list[i][1] -= cnt
		if soinsu_list[i][1] < 0:
			cnt -= 1
			break
	ans += cnt
print(ans)