#include"stdio.h" #include"string.h" int main() { int step[111][111]; int time,start,end; int n; int i,l; while(scanf("%d%d%d%d",&n,&start,&time,&end)!=-1) { for(l=1;l<=n;l++) step[0][l]=0; step[0][start]=1; for(i=1;i<=time;i++) { step[i][1]=step[i-1][2]; step[i][n]=step[i-1][n-1]; for(l=2;l<n;l++) { step[i][l]=step[i-1][l-1]+step[i-1][l+1]; } } printf("%d\n",step[time][end]); } return 0; }