import java.util.*;
public class Main {
      public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      }
} import java.util.*; util.* java public class Main {
      public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      }
} Main public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      } main {
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      } Scanner s = new Scanner(System.in); s new Scanner(System.in) int a = s.nextInt(); a s.nextInt() s.nextInt s int b = s.nextInt(); b s.nextInt() s.nextInt s int c = s.nextInt(); c s.nextInt() s.nextInt s int x = s.nextInt(); x s.nextInt() s.nextInt s int count = 0; count 0 for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        } int i=a; int i=a; i a i>=0 i 0 i-- i-- i {     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        } {     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        } for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         } int j=b; int j=b; j b j>=0 j 0 j-- j-- j {
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         } {
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         } for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            } int k=c; int k=c; k c k>=0 k 0 k-- k-- k {
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            } {
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            } int number = 500 * i + 100 * j + 50 * k; number 500 * i + 100 * j + 50 * k 500 * i + 100 * j + 50 * k 500 * i 500 i 100 * j 100 j 50 * k 50 k if(number == x){
              count++;  
              } number == x number x {
              count++;  
              } count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
      public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      }
} public class Main {
      public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      }
} Main
import java.util.*;
public class Main {
      public static void main(String args[]){
        Scanner s = new Scanner(System.in);
        
        int a = s.nextInt();
        int b = s.nextInt();
        int c = s.nextInt();
        int x = s.nextInt();
        
        int count = 0;
        for(int i=a;i>=0;i--){     
          for(int j=b;j>=0;j--){
            for(int k=c;k>=0;k--){
              int number = 500 * i + 100 * j + 50 * k;
              if(number == x){
              count++;  
              }  
            }
          
         }
            
        }
        
        System.out.println(count);
        
      }
}