public void doRun(TapeDrive in1, TapeDrive in2, TapeDrive out1, TapeDrive out2, int runNumber) {
        // TODO: Implement me for 15 points
    	int chunckSize = (int) (memorySize * (Math.pow(2, runNumber)));
    	int fullChuncks = tapeSize / (chunckSize * 2);
    	int leftOver = tapeSize - fullChuncks * chunckSize * 2;
    	TapeDrive dest = out1;
    	for(int i = 0; i < fullChuncks; ++i) {
    		this.mergeChunks(in1, in2, dest, chunckSize, chunckSize);
    		dest = dest == out1 ? out2 : out1;
    	}
    	int size1, size2;
    	if(leftOver > chunckSize) {
    		size1 = chunckSize;
    		size2 = leftOver - chunckSize;
    	} else {
    		size1 = leftOver;
    		size2 = 0;
    	}
    	this.mergeChunks(in1, in2, dest, size1, size2);
    	in1.reset();
    	in2.reset();
    	out1.reset();
    	out2.reset();
    }