One day Vasya got hold of information on the Martian dollar course in bourles for the next n days. The buying prices and the selling prices for one dollar on day i are the same and are equal to ai. Vasya has b bourles. He can buy a certain number of dollars and then sell it no more than once in n days. According to Martian laws, one can buy only an integer number of dollars. Which maximal sum of money in bourles can Vasya get by the end of day n?

Input

The first line contains two integers n and b (1 ≤ n, b ≤ 2000) — the number of days and the initial number of money in bourles. The next line contains n integers ai (1 ≤ ai ≤ 2000) — the prices of Martian dollars.

Output

Print the single number — which maximal sum of money in bourles can Vasya get by the end of day n.

Examples

Input

2 4
3 7


Output

8


Input

4 10
4 3 2 1


Output

10


Input

4 10
4 2 3 1


Output

15
import java.awt.List;
import java.io.BufferedReader;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.*;

public class Watermelon {
	public static void main(String[] args) throws IOException{
		Main m=new Main();
		m.solve();
	}
	}
class Main{
	static int[] temp=new int[100];
	 BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

	   
	    StringTokenizer stringTokenizer;

	     String next() throws IOException {
	        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
	            stringTokenizer = new StringTokenizer(reader.readLine());
	        }
	        return stringTokenizer.nextToken();
	    }

	    int nextInt() throws IOException {
	        return Integer.parseInt(next());
	    }

	    long nextLong() throws IOException {
	        return Long.parseLong(next());
	    }
	    void solve() throws IOException  {
	    	int n=this.nextInt();
	    	int b=this.nextInt();
	    	int[] arr=new int[n];
	    	for(int i=0;i<n;i++)
	    		arr[i]=this.nextInt();
	    	ArrayList<Integer> list=new ArrayList<>();
	    	for(int i=0;i<arr.length;i++){
	    		int x=b/arr[i];
	    		int y=b%arr[i];
	    		for(int j=i;j<n;j++){
	    			list.add(y+x*arr[j]);
	    		}
	    		
	    	}
	    	//System.out.println(list);
	    	int max=list.get(0);
	    	for(int i=0;i<list.size();i++){
	    		if(max<list.get(i))
	    			max=list.get(i);
	    	}
	    	System.out.println(max);
	    }
	  
	private static int gcd(int a, int b)
	{
	    while (b > 0)
	    {
	    	int temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	private static int lcm(int a, int b)
	{
	    return a * (b / gcd(a, b));
	}
	static int[] toFractionPos(int x,int y){
		int a=gcd(x,y);
		int[] arr={x/a,y/a};
		//display(arr);
		return arr;
	}
   
	static void display(char[][] arr){
		for(int i=0;i<arr.length;i++){
			for(int j=0;j<arr[i].length;j++){
				System.out.print(arr[i][j]+" ");
		}
			System.out.println();
		}
		System.out.println();
	}

	 static void display(String[] arr){
			for(int i=0;i<arr.length;i++){
				
			}	
			System.out.println();
		
	 }
	 static void display(int[] arr){
		 for(int i=0;i<arr.length;i++)
				System.out.print(arr[i]+" ");
		System.out.println();
		 }
		 static void display(double[] arr){
		 	   for(int i=0;i<arr.length;i++){
		 		   System.out.print(arr[i]+" ");
		 	   }
		 	   System.out.println();
	    }
	 static void display(char[] arr){
		// System.out.println();
		 int t=0;
			for(int i=0;i<arr.length;i++){
				if(arr[i]!='0'){t=i;break;}
			}	
			while(t!=arr.length){
				System.out.print(arr[t]);
				t++;
			}
			System.out.println();
		
		  }
	 static String str(char[] carr){
		 String str="";
		 for(int i=0;i<carr.length;i++){
			    str=str+carr[i];
			}
		 return str;
	 }
}
class  Count {
    char i;
    int c;
    Count(char i,int c){
    	this.i=i;this.c=c;
    }
    void display(){
    	System.out.println(i+" "+c);
    }
    
    /*	@Override
	public int compareTo(Object o) {
		// TODO Auto-generated method stub
		Count c=(Count)o;
		if(this.i>c.i)
			return 1;
		else if(this.i<c.i)
			return -1;
		else return 0;
	}
	*/
}
class  Count1 implements Comparable {
    int i;
    int j;
    Count1(int i,int j){
        this.j=j;
        this.i=i;
    }
    void display(){
    	System.out.println(i+" "+j);
    }
    
    	@Override
	public int compareTo(Object o) {
		// TODO Auto-generated method stub
		Count1 c=(Count1)o;
		if(j>c.j)
			return 1;
		else if(j<c.j)
			return -1;
		else
			return 0;
	}
	
}
	
