from subprocess import*

p=run(('factor',eval(input())),stdout=PIPE).stdout.split()[1:]

print((sum(int((8*p.count(i)+1)**.5/2-.5)for i in set(p))))
from subprocess import*

p=run(('factor',eval(input())),stdout=PIPE).stdout.split()

print((sum(int((8*p.count(i)+1)**.5/2-.5)for i in set(p))-1))
from subprocess import *

p = run(("factor", eval(input())), stdout=PIPE).stdout.split()[1:]
print((sum(int((8 * p.count(i) + 1) ** 0.5 / 2 - 0.5) for i in set(p))))

from subprocess import *

p = run(("factor", eval(input())), stdout=PIPE).stdout.split()
print((sum(int((8 * p.count(i) + 1) ** 0.5 / 2 - 0.5) for i in set(p)) - 1))

-p = run(("factor", eval(input())), stdout=PIPE).stdout.split()[1:] -print((sum(int((8 * p.count(i) + 1) ** 0.5 / 2 - 0.5) for i in set(p)))) +p = run(("factor", eval(input())), stdout=PIPE).stdout.split() +print((sum(int((8 * p.count(i) + 1) ** 0.5 / 2 - 0.5) for i in set(p)) - 1))