Amazon interview question

Basic math and role play