let a: Int = Int(readLine()!)!
let b: Int = Int(readLine()!)!
let c: Int = Int(readLine()!)!
let x: Int = Int(readLine()!)!

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)