#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int all = 0;
  int a = 0;
  for (int i = 0; i < 5; i++) {
    cin >> a;
    all += a / 10;
    if (a % 10 != 0) {
      all++;
    }
  }
  cout << all << endl;
  return 0;
}
