Russia and Ukraine say they have reached a final agreement on natural gas deliveries for the rest of the year .