import sys,random from collections import deque from heapq import heappush,heappop input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) N,L = mi() W = li() M = max(W) dist = [L+1 for i in range(M)] dist[0] = 0 deq = deque([0]) while deq: r = deq.popleft() for i in range(N): c = (dist[r]*M+r+W[i])//M nr = (r+W[i])%M if dist[nr] > c: dist[nr] = c if c==dist[r]: deq.appendleft(nr) else: deq.append(nr) D = [r+dist[i]*M for i in range(M)] res = 0 for r in range(M): if D[r] <= L: res += (L-D[r])//M + 1 print(res-1)