Theatre Square in the capital city of Berland has a rectangular shape with the size *n* × *m* meters. On the occasion of the city's anniversary, a decision was taken to pave the Square with square granite flagstones. Each flagstone is of the size *a* × *a*.

What is the least number of flagstones needed to pave the Square? It's allowed to cover the surface larger than the Theatre Square, but the Square has to be covered. It's not allowed to break the flagstones. The sides of flagstones should be parallel to the sides of the Square.
The input contains three positive integer numbers in the first line: *n*,  *m* and *a* (1 ≤  *n*, *m*, *a* ≤ 10<sup class="upper-index">9</sup>).
6 6 4
4
1 1 1
1
2 1 1
2
1 2 1
2
2 2 1
4
2 1 2
1
1 1 3
1
2 3 4
1
1000000000 1000000000 1
1000000000000000000
12 13 4
12
222 332 5
3015
1000 1000 10
10000
1001 1000 10
10100
100 10001 1000000000
1
1000000000 1000000000 1000000000
1
1000000000 1000000000 999999999
4
1000000000 1000000000 192
27126743055556
1000000000 987654321 1
987654321000000000
456784567 1000000000 51
175618850864484
39916800 134217728 40320
3295710

#!/usr/bin/env python
from __future__ import division, print_function
import math
import os
import sys
from io import BytesIO, IOBase
def read():
	sys.stdout = open('C:/Users/hp/OneDrive/Desktop/Tech Communication/Contest/output.in', 'w')
	sys.stdin = open('C:/Users/hp/OneDrive/Desktop/Tech Communication/Contest/input.in', 'r')

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def ii():  return int(input())                          # integer 
def si():  return input()                               # string
def mi():  return map(int,input().strip().split(" "))   # mapping integer
def msi(): return map(str,input().strip().split(" "))   # mapping string
def li():  return list(mi())     						# list input


abc = 'abcdefghijklmnopqrstuvwxyz'
a2n = {'a':0,'b':1,'c':2,'d':3,'e':4,'f':5,'g':6,'h':7,'i':8,'j':9,'k':10,'l':11,'m':12,'n':13,'o':14,'p':15,'q':16,'r':17,'s':18,'t':19,'u':20,'v':21,'w':22,'x':23,'y':24,'z':25}
n2a = {1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j',11:'k',12:'l',13:'m',14:'n',15:'o',16:'p',17:'q',18:'r',19:'s',20:'t',21:'u',22:'v',23:'w',24:'x',25:'y',26:'z'}
mod = 1000000007
# mod = 998244353
inf = float("inf")
vow = ['a','e','i','o','u']
dx,dy = [-1,1,0,0,1,-1,1,-1],[0,0,1,-1,1,-1,-1,1]
def getKey(item) : return item[1]  # get an item from the dictionary
def sort2(l) : return sorted(l, key=getKey,reverse=True)    # reverse sort according to string
def d2(n,m,num) : return [[num for x in range(m)] for y in range(n)]    
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )    # checks is a power of 2 or not
def decimalToBinary(n): return bin(n).replace("0b","")  # decimal to binary
def ntl(n):return [int(i) for i in str(n)]  # converts string to integer
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1))) 

def debug(anyTypeOfDataType):
    names = str(anyTypeOfDataType)
    with open('C:/Users/hp/OneDrive/Desktop/Tech Communication/Contest/output.in', 'w') as f: f.write(names)

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res
 
def LCMofArray(a):
    lcm = a[0]
    for i in range(1,len(a)): lcm = lcm*a[i]//math.gcd(lcm, a[i])
    return lcm


def dmain():
    sys.setrecursionlimit(1000000)
    threading.stack_size(1024000)
    thread = threading.Thread(target=main)
    thread.start()

def main():
	try:
		read()
		readIO()
	except FileNotFoundError: readIO()


def readIO():
    def noLoop(): return solve()
    def oneLoop():
        firstLoop = ii()
        for _ in range(1,firstLoop+1): solve()
    def twoLoops():
        firstLoop = ii() 
        for _ in range(firstLoop):
            secondLoop = ii()
            for se in range(secondLoop): solve()
    noLoop()
    #oneLoop()

def solve():
	store = []      # list
	dic = {}       # dictionary
	flag = False    # identifier
	counter = 0     # iteration
	summation = 0   # sum

#<<<<<<<<<<<<<<<<<<<Main Code>>>>>>>>>>>>>>>>>>>>>

	n,m,a=mi()
	x=n//a 
	y=m//a 
	if n%a!=0:
		x+=1
	if m%a!=0:
		y+=1
	print(x*y)

		


	
	




	









		











# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()