Mary and the teacher played a number guessing game. Mary input a three-digit number on the calculator at will. The teacher asked her to multiply by 27, then multiplied the number by 37, and told the teacher the last three digits of the result. The teacher immediately guessed that Mary was in the calculator. What are the three digits entered above, and now Mary tells the teacher that the last three digits are 142. What is the three-digit number that Mary entered on the calculator.
玛丽和老师做猜数游戏，玛丽在计算器上任意输入一个三位数，老师让她乘27，得数再乘37，把结果的末三位数告诉老师，老师立即猜出玛丽在计算器上输入的三位数是几，现在玛丽告诉老师的末三位数是142．玛丽在计算器上输入的三位数是多少．
<gadget id="calculator">1_000 - 142</gadget>
<output>858</output>

<result>858</result>