It is known that fleas in Berland can jump only vertically and horizontally, and the length of the jump is always equal to s centimeters. A flea has found herself at the center of some cell of the checked board of the size n × m centimeters (each cell is 1 × 1 centimeters). She can jump as she wishes for an arbitrary number of times, she can even visit a cell more than once. The only restriction is that she cannot jump out of the board.

The flea can count the amount of cells that she can reach from the starting position (x, y). Let's denote this amount by dx, y. Your task is to find the number of such starting positions (x, y), which have the maximum possible value of dx, y.

Input

The first line contains three integers n, m, s (1 ≤ n, m, s ≤ 106) — length of the board, width of the board and length of the flea's jump.

Output

Output the only integer — the number of the required starting positions of the flea.

Examples

Input

2 3 1000000


Output

6


Input

3 3 2


Output

4


stdin_flag=1
if not stdin_flag:
  read_line_index=0
  testcasefilename="test.txt"
  Stestcase=open(testcasefilename).read()
  read_line_datas=Stestcase.split("\n")


#####################################
######################################

def read_line():
  global read_line_index
  if stdin_flag:
    return raw_input()
  else:
    s=read_line_datas[read_line_index]
    read_line_index+=1
    return s

def answer():
  if stdin_flag:
    return solve()
  else:
    while read_line_proceed():
      solve()
      

def read_line_proceed():
  global read_line_index
  print"##################"
  while 1:
    if read_line_index>= len (read_line_datas ):
      return False
    if read_line_datas[read_line_index]=="%%%":
      read_line_index+=1
      return True
    read_line_index+=1


def readint():
  return int (read_line() )


def readints():
  return map(int, read_line().split(" "))

def reads():
  return read_line()

###############################################################
###############################################################
###############################################################
###############################################################
###############################################################
###############################################################
###############################################################
###############################################################


def f(n,s):
  if n<=s:return n
  return ((n-1)%s+1)*((n-1)/s+1)

def compute(n,m,s):
  return f(n,s)*f(m,s)

def solve():
  n,m,s=readints()
  print compute(n,m,s)

def test():
  pass

test()
answer()
