import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int K = sc.nextInt(); int [] c = new int [1000001]; for(int i=0; i0){ if(c[W]=0; j--){ c[j]++; } } }else{ if(c[1-W]-c[-W]<0){ for(int j=-W; j>=0; j--){ c[j]--; } } } } System.out.println(c[0]); } }