#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { int s=0,k=0; for(int i=1;i<=n;i++) { s+=k; if(i%2==0) k++; } cout<<s<<endl; } return 0; }
Double click to view unformatted code.