#include int main() { // 幻の木_740| int N = 0, M = 0, P = 0, Q = 0, month = 0, count = 0; std::cin >> N; // 枚数 std::cin >> M; // 落とす枚数 std::cin >> P; // 強い風が吹き始める月 std::cin >> Q; // 強い風が吹き終わる月 month = 0; // 今の月 count = 0; // カウント while(N > 0) { count++; month++; if (month == 13) { month = 1; } else{} if (month >= P && month <= Q) { N -= 2 * M; } else { N -= M; } } std::cout << count << std::endl; return 0; }