Update A2.tex

changed capacity to pay, added weight function