# Barney goes to Work

Barney is a busy guy. He can only afford to come to his office on 100 days.

Goliath National Bank decided to pay him $$a_i$$ if he comes on day $$i$$ and fine him $$b_i$$ if he misses day $$i$$.

This being the lists $$<a_i>$$ and $$<b_i>$$, for $$n = 10^4$$ days, what is the minimum amount that Barney would have to pay Goliath National Bank at the end of the year?

• Input Format: Line 1 contains all $$a_i$$ sequentially from $$i = 1$$ to $$10^4$$ and Line 2 contains all the corresponding $$b_i$$
×