import java.io.*; public class Mosquito { public static void main(String[] args) throws Exception { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int length; int count; while(true) { String line = in.readLine(); if(line == null) break; String data[] = new String[7]; data = line.split(" "); Integer M = new Integer(data[0]); Integer P = new Integer(data[1]); Integer L = new Integer(data[2]); Integer E = new Integer(data[3]); Integer R = new Integer(data[4]); Integer S = new Integer(data[5]); Integer N = new Integer(data[6]); for(int i=0; i<N;i++){ int pom=M; M=P/S; P=L/R; L=pom*E; } System.out.println(M); } }}