#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<bits/stdc++.h>
using namespace std;
long long a[9999]={0,1,2,4,7};
int main(){
int n;
cin>>n;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
cout<<a[i];
}
#include<>
using namespace std;
long long a[1100];
int main(){
int n;
cin>>n;
while(1){
a[1]=1;
a[2]=2;
a[3]=4;
a[4]=7;
for(int i=4;i<=n;i++){
a[i]=a[i-2]+a[i-1]+a[i-3];
}
break;
}
cout<****
}