There are several soldiers in a detachment. Every evening three of them are on duty. After a certain period of time each soldier has shared duty with every other exactly once. What is the minimum possible number of soldiers in the detachment?