First try at calculating the solution