Added solution 24 (part 1)