Add stack with min function