#include <stdio.h>
int main() {
long long n,m,a;
scanf("%lld%lld%lld",&n,&m,&a);
long long chang,kuan,count;
chang=(n+a-1)/a;
kuan=(m+a-1)/a;
count=chang*kuan;
printf("%lld",count);
return 0;
}
向上取整
a/b==(a+b-1)/b