import math def next_Perfect_Square(N): nextN = math.floor(math.sqrt(N)) + 1 return nextN * nextN