Nice little optimization thanks to problem description