Amazon interview question

Required income