Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

_The rules:_

You have a wooden plank, a _sjoelbak_, with 4 boxes, each with their own number. When a _schijf_ (A puck-like object) goes in one of the boxes you get the points above that box.

![A _sjoelbak_ with _schijven_][1]<br>
When a _schijf_ is in all 4 of the boxes, you don't get 10 but you get 20 points.

_Example:_

From left to right: 3 5 4 3<br>
Each box has at least 3 _schijven_ (Plural of _schijf_) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0<br>
0*2 + 2*3 + 1*4 + 0*1 = 10 points.<br>

Which makes a total of 60+10 = 70 points.

_The input:_<br>
The amount of _schijven_ from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

_The output:_<br>
The amount of points, ie 84


As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.


  [1]: https://i.sstatic.net/wv2rm.jpg