fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. #define el << "\n"
  5.  
  6. int main() {
  7. ios::sync_with_stdio(false);
  8. cin.tie(nullptr);
  9. cout.tie(nullptr);
  10. ll n,m,a;
  11. cin>>n>>m>>a;
  12. cout<<((n+a-1)/a)*((m+a-1)/a);
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5280KB
stdin
2 1 1
stdout
2