Designing a stack with minimum value