#include <iostream>

using namespace std;

int main()
{
    int a,b,c,x,r=0;
    cin>>a;
    cin>>b;
    cin>>c;cin>>x;
for(int i=0;i<=a;i++){
  for(int j=0;j<=b;j++){
    for(int d=0;d<=c;d++){
        if(x==i*500+j*100+d*50)r+=1;

  }}}

  cout<<r;

    return 0;
}