#import <Foundation/Foundation.h>
#import <stdarg.h>

@interface StdIO : NSObject
+(NSMutableString*)stringFromStdIn;
+(void)printf:(NSString*)format, ...;
@end
@implementation StdIO
+(NSMutableString*)stringFromStdIn
{
    NSFileHandle *handle = [NSFileHandle fileHandleWithStandardInput];
    NSMutableString *result = [NSMutableString string];
    NSData *data = [handle availableData];
    while ([data length] > 0) {
        [result appendString:[[[NSString alloc] initWithData: data encoding: NSUTF8StringEncoding] autorelease]];
        data = [handle availableData];
    }
    return result;
}
+(void)printf:(NSString*)format, ...
{
    va_list arguments;
    va_start(arguments, format);
    NSString *string = [[[NSString alloc] initWithFormat: format arguments: arguments] autorelease];
    NSFileHandle *fileHandle = [NSFileHandle fileHandleWithStandardOutput];
    [fileHandle writeData:[string dataUsingEncoding: NSUTF8StringEncoding]];
    va_end(arguments);
}
@end

int main() {
    @autoreleasepool {
        NSArray *numbers = [[StdIO stringFromStdIn] componentsSeparatedByString:@"\n"];
        NSInteger a = [[numbers objectAtIndex: 0] integerValue];
        NSInteger b = [[numbers objectAtIndex: 1] integerValue];
        NSInteger c = [[numbers objectAtIndex: 2] integerValue];
        NSInteger X = [[numbers objectAtIndex: 3] integerValue] / 50;
        NSInteger count = 0;
        NSInteger x = 0;
        while (x <= MIN(a,X/10)) {
            NSInteger Y = X-10*x;
            NSInteger y = 0;
            while (y <= MIN(b,Y/2)) {
                NSInteger z = Y-2*y;
                if (z <= c) {
                    count++;
                }
                y++;
            }
            x++;
        }
        [StdIO printf:@"%ld", count];
    }
    
    return 0;
}
