program main
  implicit none
  integer a, b, c, d, e
  read(*, *) a
  read(*, *) b
  read(*, *) c
  read(*, *) d
  read(*, *) e
  a = a/10
  a = 10*(a + 1)
  b = b/10
  b = 10*(b + 1)
  c = c/10
  c = 10*(c + 1)
  d = d/10
  d = 10*(d + 1)
  e = e/10
  e = 10*(e + 1)
  write(*, '(i0)') a+b+c+d+e
end program main