from math import sqrt

def issumofsqcube(n, count=0, b=2):
    while (count <= 5 or b in range(2, 1 + int(pow(n - 4, 1/3)))):
        if isinstance(sqrt(n - pow(b, 3)), int):
            count = count + 1
            b = b + 1
        else:
            return count

print(issumofsqcube(5229225))

