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