typedef long long l;l s,t,q,i,m;l f(l n){n+=m;return n>0?n*-~n/2:0;}main(u,v,d,x,y){scanf("%lld%lld%d%d%d",&s,&t,&u,&v,&d);for(q=s*u<=0&t*v<=0;x=s>0?s:0,y=t>1?t:1,m=d-x-y,x-=u,y-=v,i++<4;x=s,s=-v,v=u,u=-t,t=x)x<1&y<1?q+=f(1)-f(x)-f(y)+f(x+y-1):0;i=!printf("%lld",q);}