Save money with price rounding
Ruby, 119 105 characters (93 body)

def f s
a,b,c,d=(1..4).map{|i|s.count{|x|x%5==i}}
s.reduce(0,:+)-a-(c-m=c&gt;d ?d:c)/2-2*(b+m+(d-m)/3)
end


Two characters may be saved if the algorithm is allowed to crash when fed an empty shopping list.