#include #include #include #include #define rep(i,l,r) for (int i=l;i<=r;i++) #define maxn 100050 #define inf 1152921504606846976 #define low(i) i&(-i) #define clr(x,y) memset(x,y,sizeof(x)) #define ll long long using namespace std; int flag,n,sum[maxn],ss; ll f[maxn],ans; int read() { int x=0, f=1; char ch=getchar(); while (!isdigit(ch)) {if (ch=='-') f=-1; ch=getchar();} while (isdigit(ch)) x=x*10+ch-'0', ch=getchar(); return x*f; } int main(){ // freopen("in.txt","r",stdin); while(~scanf("%d",&n)){ ans=0; rep(i,1,n) f[i]=1; f[1]=f[2]=f[3]=1; rep(i,4,n) rep(j,1,i-3) f[i]+=f[j]; rep(i,1,n) ans+=f[i]; printf("%I64d\n",ans); } return 0; }