Making problem 62 faster