Amazon interview question

Be prepared for the math flow question