A worker at a frozen yogurt store has 512 pints of frozen yogurt to give to customers as samples. The worker places 14 cup of frozen yogurt in each sample. What is the maximum number of samples the worker can distribute if he uses all of the frozen yogurt?