# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.

n, m, k = map(int, input().split())
print(((n - 1) // k + 1) * ((m - 1) // k + 1))
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
