problem 46

Answer is 5777