// Java version with (slow) Scanner import java.util.*; public class LinesPerHour_Godmar { public static void main(String []av) { var sc = new Scanner(System.in); int n = sc.nextInt(); int lph = sc.nextInt(); int [] loc = new int[n]; for (int i = 0; i < n; i++) loc[i] = sc.nextInt(); Arrays.sort(loc); int total_loc = 0; int answer = 0; for (var l : loc) { total_loc += l; if (total_loc > 5 * lph) break; answer++; } System.out.println(answer); } }