class Solution(object):
def minSteps(self, n):
"""
:type n: int
:rtype: int
"""
ans = 0
i = 2
while i * i <= n:
while n % i == 0:
n = n / i
ans += i
i += 1
if n > 1:
ans += n
return ans