Perfect Square Nearest to a Given Number