

def     a__  (	UpperCAmelCase							:    int    )						->		bool:
  UpperCAmelCase :							Dict								=				9

  while num > 0:
    if num % 10 != digit:
      return False
    num //= 100
    digit -= 1

  return True

def     a__  (	)						->		int:
  UpperCAmelCase :							List[str]								=				138_902_663

  while not is_square_form(num * num    ):
    if num % 10 == 3:
      num -= 6  # (3 - 6) % 10 = 7
    else:
      num -= 4  # (7 - 4) % 10 = 3

  return num * 10


if __name__ == "__main__":
     print(f"""{solution() = }""")








import decimal

def     a__  (	)						->		int:
  UpperCAmelCase :							List[Any]								=				0
  UpperCAmelCase :							Dict								=				decimal.Context(prec=105    )
  for i in range(2       ,				100    ):
    UpperCAmelCase :							List[str]								=				decimal.Decimal(UpperCAmelCase    )
    UpperCAmelCase :							List[str]								=				number.sqrt(UpperCAmelCase    )
    if len(str(UpperCAmelCase    )    ) > 1:
      answer += int(str(UpperCAmelCase    )[0]    )
      UpperCAmelCase :							str								=				str(UpperCAmelCase    )[2:101]
      answer += sum(int(UpperCAmelCase    ) for x in sqrt_number_str    )
  return answer


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(f"""{solution() = }""")





