Amazon interview question

Implement a maximum stack, such that getting the maximum value of the stack takes O(1) time.