#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, e;
  cin >> a;
  cin >> b;
  cin >> c;
  cin >> d;
  cin >> e;
  cout << (a + 9) / 10 + (b + 9) / 10 + (c + 9) / 10 + (d + 9) / 10 +
              (e + 9) / 10
       << endl;
}
