Amazon Interview Question

Required income