Devu is a renowned classical singer. He is invited to many big functions/festivals. Recently he was invited to "All World Classical Singing Festival". Other than Devu, comedian Churu was also invited.

Devu has provided organizers a list of the songs and required time for singing them. He will sing n songs, i^{th} song will take t_{i} minutes exactly. 

The Comedian, Churu will crack jokes. All his jokes are of 5 minutes exactly.

People have mainly come to listen Devu. But you know that he needs rest of 10 minutes after each song. On the other hand, Churu being a very active person, doesn't need any rest.

You as one of the organizers should make an optimal sсhedule for the event. For some reasons you must follow the conditions:  The duration of the event must be no more than d minutes;  Devu must complete all his songs;  With satisfying the two previous conditions the number of jokes cracked by Churu should be as many as possible. 

If it is not possible to find a way to conduct all the songs of the Devu, output -1. Otherwise find out maximum number of jokes that Churu can crack in the grand event.


-----Input-----

The first line contains two space separated integers n, d (1 ≤ n ≤ 100; 1 ≤ d ≤ 10000). The second line contains n space-separated integers: t_1, t_2, ..., t_{n} (1 ≤ t_{i} ≤ 100).


-----Output-----

If there is no way to conduct all the songs of Devu, output -1. Otherwise output the maximum number of jokes that Churu can crack in the grand event.


-----Examples-----
Input
3 30
2 2 1

Output
5

Input
3 20
2 1 1

Output
-1



-----Note-----

Consider the first example. The duration of the event is 30 minutes. There could be maximum 5 jokes in the following way:  First Churu cracks a joke in 5 minutes.  Then Devu performs the first song for 2 minutes.  Then Churu cracks 2 jokes in 10 minutes.  Now Devu performs second song for 2 minutes.  Then Churu cracks 2 jokes in 10 minutes.  Now finally Devu will perform his last song in 1 minutes.  

Total time spent is 5 + 2 + 10 + 2 + 10 + 1 = 30 minutes.

Consider the second example. There is no way of organizing Devu's all songs. Hence the answer is -1.

Difficulty: interview

Starter code:

Solutions:
"""
Codeforces Round 251 Div 2 Problem A

Author  : chaotic_iak
Language: Python 3.3.4
"""

def read(mode=2):
    # 0: String
    # 1: List of strings
    # 2: List of integers
    inputs = input().strip()
    if mode == 0:
        return inputs
    if mode == 1:
        return inputs.split()
    if mode == 2:
        return [int(x) for x in inputs.split()]

def write(s="\n"):
    if isinstance(s, list): s = " ".join(s)
    s = str(s)
    print(s, end="")

################################################### SOLUTION
n,d = read()
t = read()
s = sum(t) + 10*n - 10
if s > d:
    print(-1)
else:
    print((d-sum(t))//5)

n, d = map(int, input().split())
t = list(map(int, input().split()))
T = sum(t) + 10 * (n - 1)
if T > d:
    print(-1)
else:
    print(2 * (n - 1) + (d - T) // 5)

sa=input().split(' ')
songs=int(sa[0])
mins=int(sa[1])
sa2=input().split(' ')
sa3=[]
for item in sa2:
    sa3.append(int(item))

sums=0
for item in sa3:
    sums+=item
    
if (songs-1)*10+sums>mins:
    print(-1)

else:
    print((mins-sums)//(5))


n, d = [int(i) for i in input().split()]
t = [int(i) for i in input().split()]

result = -2
time = -10
for i in t:
    time += i + 10
    result += 2

if time > d:
    print(-1)
else:
    print(result + (d - time) // 5)


# -*- coding: utf-8 -*-

n, d = list(map(int, input().split()))

ts = list(map(int, input().split()))

x = d-(sum(ts)+ (n-1)*10)

if x >= 0:
    print(2*(n-1)+x//5)
else:
    print(-1)



(n, d)=list(map(int, input().split()))
a=list(map(int, input().split()))
if sum(a)+(len(a)-1)*10<=d:
    print((d-sum(a))//5)
else:
    print(-1)


n, d = [int(c) for c in input().split()]
t = sum([int(c) for c in input().split()])

breaks = (n - 1) * 10

if t + breaks > d:
    print(-1)
else:
    free = d - (t + breaks)
    print(2*(n - 1) + (free // 5))

(n, d) = list(map(int, input().split()))
songs = list(map(int, input().split()))

time_used = sum(songs) + (n-1)*10
if (time_used > d):
    print(-1)
else:
    print((d - time_used) // 5 + 2*(n - 1))


n, d = map(int,input().split())
t = list(map(int,input().split()))
sum = 0
for ti in t:
    sum += ti
if sum+(n-1)*10 <= d:
    print((d-sum)//5)
else:
    print(-1)

n,d = map(int,input().split(' '))
ns = list(map(int,input().split(' ')))

if d<sum(ns)+10*(len(ns)-1):
    print(-1)
else:
    answer = (d-sum(ns))//5
    print(answer)

n, t = list(map(int, input().split()))
s = list(map(int, input().split()))

if sum(s)+(len(s)-1)*10>t:
    print(-1)
else:
    print(((len(s)-1)*2) + (t-sum(s)-(len(s)-1)*10)//5)


n, d = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
if s+10*(n-1) > d:
    print(-1)
else:
    print((d-s)//5)

n,d=list(map(int,input().split()))
songs=list(map(int,input().split()))
sparetime=d-(n-1)*10-sum(songs)
if(sparetime<0):
    print(-1)
else:
    print((n-1)*2+sparetime//5)


n , d = list(map(int, input().split()))
t = list(map(int, input().split()))

tot = sum(t)
limit = tot + (n-1)*10

rest = d - limit

c = 0
#print(rest)
if limit > d :
    print(-1)
else:
    for i in range(n-1):
        c += 2

    c += (rest // 5)

    print(c)


a=list(map(int,input().split()))
n=a[0]
d=a[1]
s=0
gg=list(map(int,input().split()))
s=sum(gg)
if s+(n-1)*10>d:
	print('-1')
else:
	print((n-1)*2+(d-(s+(n-1)*10))//5 )


n, d = map(int, input().split())
t = list(map(int, input().split()))
sum_time = (n - 1) * 10 + sum(t)
if sum_time > d:
    print(-1)
else:
    res_time = d - sum_time
    cnt = res_time / 5 + (n - 1) * 2
    print(int(cnt))

from sys import stdin as cin,stdout as cout
from math import factorial as f
from itertools import combinations as comb
n,d = list(map(int,(cin.readline().split())))
a = list(map(int,(cin.readline().split())))
s = sum(a)
r = d-s-(n-1)*10
if r <0:
    print(-1)
else:
    print(int((d-s)/5))




n,d=list(map(int,input().split()))

L=list(map(int,input().split()))

s=sum(L)

s+=10*(n-1)

if(s>d):
    print(-1)
else:
    s-=10*(n-1)
    print((d-s)//5)


n,d=[int(x) for x in input().split()]
t=[int(x) for x in input().split()]
print(-1) if sum(t)+(len(t)-1)*10>d else print((d-sum(t))//5)

import sys

# f = open("a.txt", "r+")
f = sys.stdin

n, d = map(int, f.readline().strip().split())
t = list(map(int, f.readline().strip().split()))

s = sum(t)

if 10*(n-1)+s > d:
    print(-1)
else:
    jokes = 0
    d -= s
    print(d // 5)

def solve():
	n, d = list(map(int, input().split()))
	t = list(map(int, input().split()))

	sum_t = sum(t)
	if sum_t + 10 * (n - 1) > d:
		return -1
	
	ans = 2 * (n - 1) + (d - sum_t - 10 * (n - 1)) // 5
	return ans

print(solve())


n, d = list(map(int, input().split()))
t = list(map(int, input().split()))

sum_t = sum(t)
joke_time = (n-1)*10
if sum_t + joke_time <= d:
	left = d-(joke_time+sum_t)
	print((joke_time+left)//5)
else:
	print(-1)