https://avemateiu.com/problem-3/
problem 3