Joey bought 10 cupcakes and has four friends. He wants to have nothing left, but he wants everyone including him to have the same amount of cupcakes. How many cupcakes can each person get?