Problem: Opposite to Grisha's nice behavior, Oleg, though he has an entire year at his disposal, didn't manage to learn how to solve number theory problems in the past year. That's why instead of Ded Moroz he was visited by his teammate Andrew, who solemnly presented him with a set of n distinct prime numbers alongside with a simple task: Oleg is to find the k-th smallest integer, such that all its prime divisors are in this set. 

Input

The first line contains a single integer n (1 ≤ n ≤ 16).

The next line lists n distinct prime numbers p1, p2, ..., pn (2 ≤ pi ≤ 100) in ascending order.

The last line gives a single integer k (1 ≤ k). It is guaranteed that the k-th smallest integer such that all its prime divisors are in this set does not exceed 1018.

Output

Print a single line featuring the k-th smallest integer. It's guaranteed that the answer doesn't exceed 1018.

Examples

Input

3
2 3 5
7


Output

8


Input

5
3 7 11 13 31
17


Output

93

Note

The list of numbers with all prime divisors inside {2, 3, 5} begins as follows:

(1, 2, 3, 4, 5, 6, 8, ...)

The seventh number in this list (1-indexed) is eight.

Solution (in JAVA):

Solution:
/* Author: Ronak Agarwal */
import java.io.* ; import java.util.* ; import java.math.* ;
import static java.lang.Math.min ;
import static java.lang.Math.max ;
import static java.lang.Math.abs ;
/* Thread is created here to increase the stack size of the java code so that recursive dfs can be performed */
public class Codeshefcode{
	public static void main(String[] args) throws IOException{
		new Thread(null,new Runnable(){	public void run(){ exec_Code() ;} },"Solver",1l<<27).start() ;
	}
	static void exec_Code(){
		try{
			Solver Machine = new Solver() ;
			Machine.Solve() ; Machine.Finish() ;}
		catch(Exception e){ e.printStackTrace() ; print_and_exit() ;}
		catch(Error e){ e.printStackTrace() ; print_and_exit() ; }
	}
	static void print_and_exit(){ System.out.flush() ; System.exit(-1) ;}
}
class Reader{
	BufferedReader reader;
	StringTokenizer tkz;
	Reader(InputStream input) {
		reader = new BufferedReader(new InputStreamReader(input)) ;
		tkz = new StringTokenizer("") ;
	}
	String s() throws IOException{
		while (!tkz.hasMoreTokens()) tkz = new StringTokenizer(reader.readLine()) ;
		return tkz.nextToken() ;
	}
	int i() throws IOException{ return Integer.parseInt(s()) ;}
	long l() throws IOException{ return Long.parseLong(s()) ;}
	double d() throws IOException{	return Double.parseDouble(s()) ;}
}
/* All the useful functions,constants,renamings are here*/
class Template{
	/* Constants Section */
	final int INT_MIN = Integer.MIN_VALUE ; final int INT_MAX = Integer.MAX_VALUE ;
	final long LONG_MIN = Long.MIN_VALUE ; final long LONG_MAX = Long.MAX_VALUE ;
	static long MOD = 1000000007 ;
	static Reader ip = new Reader(System.in) ;	
	static PrintWriter op = new PrintWriter(System.out) ;
	/* Methods for writing */
	static void p(Object o){ op.print(o) ; }
	static void pln(Object o){ op.println(o) ;}
	static void Finish(){ op.flush();	op.close(); }
	/* Implementation of operations modulo MOD */
	static long inv(long a){ return powM(a,MOD-2) ; }
	static long m(long a,long b){ return (a*b)%MOD ; }
	static long d(long a,long b){ return (a*inv(b))%MOD ; }
	static long powM(long a,long b){
		if(b<0) return powM(inv(a),-b) ;
		long val=a ; long ans=1 ;
		while(b!=0){
			if((b&1)==1) ans = (ans*val)%MOD ; 
			val = (val*val)%MOD ; 
			b/=2 ;
		}
		return ans ;
	}
	/* Renaming of some generic utility classes */
	final static class mylist extends ArrayList<Long>{}
	final static class myset extends TreeSet<pair>{}
	final static class mystack extends Stack<Integer>{}
	final static class mymap extends TreeMap<Long,Integer>{}
}
/* Implementation of the pair class, useful for every other problem */
class pair implements Comparable<pair>{
	long x ; int y ;
	pair(long _x,int _y){ x=_x ; y=_y ;} 
	public int compareTo(pair p){
		return (this.x<p.x ? -1 : (this.x>p.x ? 1 : (this.y<p.y ? -1 : (this.y>p.y ? 1 : 0)))) ;
	}
}
/* Main code starts here */
class Solver extends Template{
	int n,p[] ;
	long l1[] = new long[5000000] ;
	long l2[] = new long[5000000] ;
	int len,len1,len2 ;
	long MAX = 2000000000000000000l ;
	long lim ;
	int arr[] ; 
	long larr[] ;
	void preCompute(){
		mylist pr1 = new mylist() ; mylist pr2 = new mylist() ;
		for(int i=0 ; i<=(n/3) ; i++) pr1.add((long) p[i]) ;
		for(int i=(int) ((n/3)+1) ; i<n ; i++) pr2.add((long) p[i]) ;
		int arr1[] = new int[pr1.size()] ;
		int arr2[] = new int[pr2.size()] ;
		for(int i=0 ; i<pr1.size() ; i++) arr1[i] = (int) pr1.get(i).longValue() ;
		for(int i=0 ; i<pr2.size() ; i++) arr2[i] = (int) pr2.get(i).longValue() ;
		len=0 ; lim = MAX/2 ; arr = arr1 ; larr = l1 ;
		getPoss(1,0) ;
		len1=len ; len=0 ; lim = MAX/2 ; arr = arr2 ; larr = l2 ;
		getPoss(1,0) ;
		len2=len ;
		Arrays.sort(l1,0,len1) ;
		Arrays.sort(l2,0,len2) ;
		// pln(len1+" "+len2) ;
		// op.flush() ;
	}
	long getCt(long lm){		
		long res=0 ;
		int ptr = len2 ;
		for(int i=0 ; i<len1 ; i++){
			while(ptr>0)
				if((l1[i]>(MAX/(l2[ptr-1]+0.0))) || l1[i]*l2[ptr-1]>lm)
					ptr-- ;
				else
					break ;
			res+=ptr ;
		}
		return res ;
	}
	void getPoss(long num,int idx){
		if(idx==arr.length){
			larr[len++] = num ;
			return ;
		}
		int prime = arr[idx] ;
		while(num<=lim){
			getPoss(num,idx+1) ;
			if(num>(MAX/(prime+0.0))) break ;
			num*=prime ;
		}
	}
	public void Solve() throws IOException{
		n = ip.i() ;
		p = new int[n] ;
		for(int i=0 ; i<n ; i++) p[i] = ip.i() ;
		Arrays.sort(p) ;
		preCompute() ;
		long k = ip.l() ;
		long l=0 ; long r = MAX/2 ;
		while((l+1)<r){
			long m = (l+r)/2 ;
			long ct = getCt(m) ;
			if(ct<k){
				l=m ;
			}else
				r=m ;
		}
		pln(r) ;
	}
}