#include using namespace std; typedef long long ll; int main() { ll a[4],d; cin>>a[0]>>a[1]>>a[2]>>a[3]>>d; for(int i=0;i<4;i++) { int k=(i/2)?-1:1; if(a[i]*k>0){ a[i+2*k]-=a[i]; d-=a[i]*k; a[i]=0; } } ll ans=d<0?0:1; for(int i=0;d>=0&&i<4;i++) { ll x=abs(a[i]),y=abs(a[(i+1)%4]); ans-=min(d,x)+1; ll z=min(d,x+y); x=max(x,z)-x; y=max(y,z)-y; ans+=(z+1)*(z+2)/2-x*(x+1)/2-y*(y+1)/2; } cout<