#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e;
  int A, B, C, D, E, T;
  cin >> A >> B >> C >> D >> E;
  A = (a + 9) / 10;
  B = (b + 9) / 10;
  C = (c + 9) / 10;
  D = (d + 9) / 10;
  E = (e + 9) / 10;
  T = A * 10 + B * 10 + C * 10 + D * 10 + E * 10;
  cout << T << endl;
}
