#include<stdio.h> int main() { long n,m,a,d; scanf("%ld%ld%ld",&n,&m,&a); d=(n/a)*(m/a); printf("%ld",d); return 0; }