high level math problem

fanbu