let A: Int = Int(readLine()!)!
let B: Int = Int(readLine()!)!
let C: Int = Int(readLine()!)!
let X: Int = Int(readLine()!)!
var res: Int = 0
for a in 0...A {
    for b in 0...B {
        for c in 0...C {
            if 500*a + 100*b + 50*c == X { res += 1 }
        }
    }
}
print(res)