def calculate_lamps(m, n, k):
    # Calculate the number of lamps needed to cover the rows.
    row_lamps = (m + k - 1) // k

    # Calculate the number of lamps needed to cover the columns.
    col_lamps = (n + k - 1) // k

    # Calculate the total number of lamps required.
    total_lamps = row_lamps * col_lamps

    return total_lamps

# Input values for the size of the square (m x n) and the size of each lamp (k).
m = int(input("Enter the width of the square (m): "))
n = int(input("Enter the height of the square (n): "))
k = int(input("Enter the size of each lamp (k): "))

# Calculate the number of lamps needed to illuminate the square.
total_lamps = calculate_lamps(m, n, k)

print(f"The mayor needs to buy {total_lamps} innovative lamps.")
