import 'dart:io';
 
void main(List<String> args){
  int A = int.parse(stdin.readLineSync());
  int B = int.parse(stdin.readLineSync());
  int C = int.parse(stdin.readLineSync());
  int X = int.parse(stdin.readLineSync());
  int count = 0;
  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==X) ++count;
  }
  print(count);
}