#include<bits/stdc++.h>
using namespace std;
int a,b,c,n,m;
int i,j,k,ans;
int main(){
	cin>>a>>b>>c>>n;
	for (int i=0;i<=a;i++){
		for (int j=0;j<=b;j++){
			for (int k=0;k<=c;k++){
				if(500*i+100*j+50*k==n)ans++;
			}
		}
	}
	cout<<ans;
	return 0;
}