#include<bits/stdc++.h>
#define int long long
using namespace std;
void solve()
{
   int n,m,k;
   cin>>n>>m>>k;
   cout<<((n+k-1)/k)*((m+k-1)/k)<<endl;
}
 main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tt=1;
 //cin >> tt;
  while(tt--)
  {
    solve();
  }
}
