func main() {
    let read = { Int(readLine()!)! }
    let a = read()
    let b = read()
    let c = read()
    let x = read()
    
    var ans = 0
    for i in 0...a {
        for j in 0...b {
            for k in 0...c {
                if 500 * i + 100 * j + 50 * k == x {
                    ans += 1
                }
            }
        }
    }
    
    print(ans)
}

main()
