include<iostream>
using namespace std;
int Fibonacci(int n)
{
int A[31];
A[0] =0;
A[1] =1;
for(int i=2;i<=n;i++)
{
A[i]=A[i-1]+A[i-2];
}
return A[n];
}
int main()
{
int n;
cin>>n;
cout<<Fibonacci(n);
}
using namespace std;
int Fibonacci(int n)
{
int A[31];
A[0] =0;
A[1] =1;
for(int i=2;i<=n;i++)
{
A[i]=A[i-1]+A[i-2];
}
return A[n];
}
int main()
{
int n;
cin>>n;
cout<<Fibonacci(n);
}