object Main extends App{
    def qABC087B(a:Int,b:Int,c:Int,x:Int) = {
        (
            for(x<-0 to a;y<-0 to b; z<-0 to c) 
                yield(x*500+y*100+z*50)
        ).count(_==x)
    }
    println(qABC087B(readLine.split(" ").map(_.toInt)))
}
