func main() {
    let fiveHandledCount = Int(readLine()!)!
    let handledCount = Int(readLine()!)!
    let fiftyCount = Int(readLine()!)!
    let amount = Int(readLine()!)!
    
    var hitCount = 0
    
    for fiveHandledSelect in 0...fiveHandledCount {
        if fiveHandledSelect * 500 == amount {
            hitCount += 1
            continue
        }
        for handledSelect in 0...handledCount {
            if (fiveHandledSelect * 500) + (handledSelect * 100) == amount {
                hitCount += 1
                continue
            }
            for fiftyCount in 0...fiftyCount {
                if (fiveHandledSelect * 500) + (handledSelect * 100) + (fiftyCount * 50) == amount {
                    hitCount += 1
                    continue
                }
            }
        }
    }
    
    print("\(hitCount)")
}

main()
