import scala.collection.mutable.ArrayBuffer
object Main {
    def main(args:Array[String]) = {
        val a = sum_4()
        val sc = new java.util.Scanner(System.in)
        while(sc.hasNextInt) {
            val n = sc.nextInt
            println(a(n))
        }
    }
    def sum_4 = () => {
        var orig = new ArrayBuffer[Int]
        orig += 1
        for (j <- 1 to 1000) orig += 0
        var i = 1
        while(i <= 4) {
            var count = new ArrayBuffer[Int]
            for (j <- 0 to i * 1000) count += 0
            for (j <- 0 to 1000) {
                count = count.zip(orig).map(x=>x._1 + x._2)
                0 +=:orig
            }
            for (j <- 0 to i * 1000) orig(j)=count(j)
            i += 1
        }
        orig
    }
}