White Rabbit wants to buy some drinks from White Cloud.
 There are n kinds of drinks, and the price of i-th drink is p[i] yuan per bottle.
 Since White Cloud is a good friend of White Rabbit, when White Rabbit buys a bottle of i-th drink, White Rabbit can choose only one of the following two discounts :
 1.
White Rabbit can get a d[i](d[i]<=p[i]) yuan discount. Specifically, White Rabbit only need to pay p[i]-d[i] yuan.
 2.
White Rabbit can buy a bottle of f[i]-th drink for free(than bonus drink can't use any discount).
 White Rabbit wants to have at least a bottle of i-th drink for each i between 1 to n. You need to tell White Rabbit what is the minimal cost.