fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int m,n,a;
  6. cin >> m >> n >> a;
  7. cout << (m+a-1)/a * (n+a-1)/a;
  8. return 0;
  9. }
Success #stdin #stdout 0s 5284KB
stdin
6 6 4
stdout
4