```
class Solution(object):
def minSteps(self, n):
if n == 1:
return 0
mf = self.maxF(n)
print mf
if mf == 1:
return n
return self.minSteps(mf) + (n / mf)
def maxF(self, n):
t = n - 1
while t > 0:
if n % t == 0:
return t
t -= 1
```