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