#
#  Book Notes Ch1.py
#  
#
#  Created by Chase Ritchey on 4/16/13.
#  Copyright (c) 2013 __ChasingTech.Net__. All rights reserved.
#

# Cube Root
x = int(raw_input('Enter an integer'))
ans = 0
while ans**3 <abs(x):
    ans = ans + 1
if ans**3 != abs(x):
    print x, 'is not a perfect cube!'
else:
    if x < 0:
	    ans = -ans
    print 'Cube root of ' + str(x) + ' is ' + str(ans)

# Decrementing Function:
# 1. Maps a set of program variables into int.
# 2. When loop is entered, it's nonnegative
# 3. When value <= 0, loop terminates.
# 4. Value is decreased through the loop


