// Arup Guha
// 11/3/2018
// Solution to 2018 SER D2 Problem: Time Limits

import java.util.*;

public class timelimits {
	
	public static void main(String[] args) {
		
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int factor = stdin.nextInt();
		
		// Get max of judge solutions.
		int max = stdin.nextInt();
		for (int i=0; i<n-1; i++)
			max = Math.max(max, stdin.nextInt());
		
		// Multiply by factor.
		max *= factor;
		
		// Round up to next multiple of 1000.
		if (max%1000 != 0) max += (1000-(max%1000));
		
		// Ta da!
		System.out.println(max/1000);
	}

}
