Solved second Euler problem