Problem 44: initial solution