solve 23rd problem