// Arup Guha
// 2/24/2024
// Solution to SER D1/D2 Problem I: Item Selection

import java.util.*;

public class i {

	public static void main(String[] args) {
	
		// Get all the basic info.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int perPage = stdin.nextInt();
		int curPage = stdin.nextInt()-1;
		int curN = stdin.nextInt();
		int newN = stdin.nextInt();
		
		// Figure out # of pages, and # of items on last page.
		int numP = n/perPage;
		if (n%perPage != 0) numP++;
		int lastPage = n%perPage == 0 ? perPage : n%perPage;
		
		// Set these up.
		boolean[][] oldP = new boolean[numP][];
		boolean[][] newP = new boolean[numP][];
		
		// Allocate space.
		for (int i=0; i<numP-1; i++) {
			oldP[i] = new boolean[perPage];
			newP[i] = new boolean[perPage];
		}
		oldP[numP-1] = new boolean[lastPage];
		newP[numP-1] = new boolean[lastPage];
		
		// Mark what items we want.
		for (int i=0; i<curN; i++) {
			int x = stdin.nextInt()-1;
			oldP[x/perPage][x%perPage] = true;
		}
		for (int i=0; i<newN; i++) {
			int x = stdin.nextInt()-1;
			newP[x/perPage][x%perPage] = true;
		}
		
		// Find min and max page where stuff is wrong.
		int minW = numP, maxW = -1;
		boolean need = false;
		for (int i=0; i<numP; i++) {
			if (!equal(oldP, newP, i)) {
				minW = Math.min(minW, i);
				maxW = Math.max(maxW, i);
				need = true;
			}
		}
		
		// This is easy.
		if (!need)
			System.out.println(0);
		
		// Now just go through each page.
		else {
		
			// We can separate out the steps moving between pages.
			int moves = 0;
			
			// Go left to right.
			if (curPage < minW) 
				moves = maxW - curPage;
			
			// Right to left.
			else if (curPage > maxW)
				moves = curPage - minW;
			
			// Go from closer side to end, then all the way back across.
			else
				moves = (maxW - minW) + Math.min(curPage-minW, maxW-curPage);
			
			// Just add in moves on each page.
			for (int i=minW; i<=maxW; i++)
				moves += getMoves(oldP, newP, i);
			
			// Ta da!
			System.out.println(moves);
		}
	}
	
	// Returns true iff a[i] and b[i] are equal arrays.
	public static boolean equal(boolean[][] a, boolean[][] b, int i) {
		for (int z=0; z<a[i].length; z++)
			if (a[i][z] != b[i][z])
				return false;
		return true;
	}
	
	public static int getMoves(boolean[][] a, boolean[][] b, int i) {
		
		// Option 1: flip all the wrong ones.
		int res = 0;
		for (int z=0; z<a[i].length; z++)
			if (a[i][z] != b[i][z])
				res++;
			
		int numT = 0;
		for (int z=0; z<b[i].length; z++)
			if (b[i][z])
				numT++;
			
		// Option 2 - go all false then flip trues.
		res = Math.min(res, 1 + numT);
		
		// Option 3 - go all true then flip false.
		int numF = b[i].length - numT;
		res = Math.min(res, 1 + numF);
		return res;
	}
}