1263 solution.
1876 solution