The first one is consistent with the actual definition of the average. When you get stuck like this, it's always good to look up the relevant definitions so you know you're working from a good foundation.

If your intuition is telling you that the two expressions should be equivalent, then your intuition was wrong. Honestly I'm not sure how you even came with the second expression, so it's hard to explain *why* it's wrong.