solution for Chopsticks, SRM 570