#include int cmp(const void *a,const void *b){ return *(double*)a-*(double*)b; } int check(double a,double b){ if(a-b>-0.0000000000001 && a-b<0.00000000000001) return 0; if(a-b>0) return 1; return -1; } int main(){ int n,i,j,k; int p,h[3]; double hen[3][4001],comp; long a,b,c; scanf("%d",&n); for(i=0;i<3;i++){ h[i]=1; hen[i][0]=1.0; } for(i=0;i=0;j--){ if(check(1.0-hen[0][i],hen[1][j])<=0){ comp=(check(hen[0][i],hen[1][i])<=0)?1.0-hen[1][j]:1.0-hen[0][i]; for(k=h[2]-1;k>=0;k--){ if(check(comp,hen[2][k])<=0){ if(check(2.0-hen[0][i]-hen[1][j],hen[2][k])!=0){ c++; } }else{ break; } } }else{ break; } } }*/ c=h[0]*h[1]*h[2]; for(i=0;i=0;j--){ if(check(1.0-hen[0][i],hen[1][j])<=0){ comp=(check(hen[0][i],hen[1][i])<=0)?1.0-hen[1][j]:1.0-hen[0][i]; for(k=h[2]-1;k>=0;k--){ if(check(comp,hen[2][k])<=0){ if(check(2.0-hen[0][i]-hen[1][j],hen[2][k])==0){ c--; } }else{ c-=k+1; break; } } }else{ c-=j+1; break; } } } printf("%ld\n",c); return 0; }