#include <bits/stdc++.h>
using namespace std;
int main() {
  double time = 0;
  for (int i = 0; i < 5; i++) {
    double dish;
    time += (i == 4 ? dish : ceil(dish));
  }
  cout << time * 10 << endl;
}
