Dan's store problem