import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args) {
BigInteger zero=new BigInteger("0");
BigInteger one=new BigInteger("1");
Scanner sc=new Scanner(System.in);
while(sc.hasNext()) {
BigInteger n=sc.nextBigInteger();
BigInteger m=sc.nextBigInteger();
BigInteger a=sc.nextBigInteger();
BigInteger x,y;
if(n.remainder(a).equals(zero))
x=n.divide(a);
else
x=n.divide(a).add(one);
if(m.remainder(a).equals(zero))
y=m.divide(a);
else
y=m.divide(a).add(one);
System.out.println(x.multiply(y));
}
}
}
1A - Theatre Square
最新推荐文章于 2018-10-15 20:02:06 发布