jack and josh shared some sweets in the ratio 4:7 josh got 18 more sweets than jack how many sweets were there in total