#include <bits/stdc++.h> using namespace std; int main(){ int i,n; cin>>i; for(int j=1;j<=i/3;j++){ for(int k=j;k<=(i-j)/2;k++){ if(i-k-j<j+k&&(k!=j||j!=i-k-j)){ n++; } } } cout<<n; } /************************************************************** Problem: 1079 User: yangjunwen Language: C++ Result: Wrong Answer ****************************************************************/