Amazon interview question

The standard Amazon math question