Create variant products price that is based on template price

for example, I have size S, M, L as attribute, template price is 100, S is 100+0, M is 100+30, L is 100+50. How do I setup for all products that has same attribute adds the fix incremental price for sizes.

thx