#include <iostream>
using namespace std;

void main(){
  double time = 0;
  
  for(int i = 0; i < 5; i++) {
    double dish;
    
    time += (i == 4 ? dish : ceil(dish));
  }
  
  cout << time * 10 << endl;
}