It is impossible to answer this question without the shoe formula, and it would be unfair if they put this question in school olympiads and any student does not know this formula.