import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int M = scan.nextInt(); int P = scan.nextInt(); int Q = scan.nextInt(); scan.close(); int t = 0; int cnt = 0; while(N > 0) { if(t >= P - 1 && t < P + Q - 1) { N -= 2 * M; }else { N -= M; } t ++; t = t % 12; cnt ++; } System.out.println(cnt); } }