output_description: Print the earliest possible time for the last dish to be delivered, as an
  integer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A
      B
      C
      D
      E
attempt: nums = [int(input()) for _ in range(5)]
  l = map(int, filter(lambda x: x != "0", [str(n)[-1] for n in nums]))
  r = [(n + 9) // 10 for n in nums]
  print(sum(r) * 10 - (10 - min(l))) if len(l) != 0 else print(sum(r) * 10)
  
problem_description: Statement
  
  The restaurant AtCoder serves the following five dishes:
  
    * ABC Don (rice bowl): takes A minutes to serve.
    * ARC Curry: takes B minutes to serve.
    * AGC Pasta: takes C minutes to serve.
    * APC Ramen: takes D minutes to serve.
    * ATC Hanbagu (hamburger patty): takes E minutes to serve.
  
  Here, the time to serve a dish is the time between when an order is placed and
  when the dish is delivered.
  
  This restaurant has the following rules on orders:
  
    * An order can only be placed at a time that is a multiple of 10 (time 0, 10, 20, ...).
    * Only one dish can be ordered at a time.
    * No new order can be placed when an order is already placed and the dish is still not delivered, but a new order can be placed at the exact time when the dish is delivered.
  
  E869120 arrives at this restaurant at time 0. He will order all five dishes.
  Find the earliest possible time for the last dish to be delivered.  
  Here, he can order the dishes in any order he likes, and he can place an order
  already at time 0.
samples: [{"input": "29\n    20\n    7\n    35\n    120", "output": "215\n    \n\nIf we decide to order the dishes in the order ABC Don, ARC Curry, AGC Pasta,\nATC Hanbagu, APC Ramen, the earliest possible time for each order is as\nfollows:\n\n  * Order ABC Don at time 0, which will be delivered at time 29.\n  * Order ARC Curry at time 30, which will be delivered at time 50.\n  * Order AGC Pasta at time 50, which will be delivered at time 57.\n  * Order ATC Hanbagu at time 60, which will be delivered at time 180.\n  * Order APC Ramen at time 180, which will be delivered at time 215.\n\nThere is no way to order the dishes in which the last dish will be delivered\nearlier than this.\n\n* * *"}, {"input": "101\n    86\n    119\n    108\n    57", "output": "481\n    \n\nIf we decide to order the dishes in the order AGC Pasta, ARC Curry, ATC\nHanbagu, APC Ramen, ABC Don, the earliest possible time for each order is as\nfollows:\n\n  * Order AGC Pasta at time 0, which will be delivered at time 119.\n  * Order ARC Curry at time 120, which will be delivered at time 206.\n  * Order ATC Hanbagu at time 210, which will be delivered at time 267.\n  * Order APC Ramen at time 270, which will be delivered at time 378.\n  * Order ABC Don at time 380, which will be delivered at time 481.\n\nThere is no way to order the dishes in which the last dish will be delivered\nearlier than this.\n\n* * *"}, {"input": "123\n    123\n    123\n    123\n    123", "output": "643\n    \n\nThis is the largest valid case."}]