#include
using namespace std;
class Solution {
public:
int Fibonacci(int n) {
int fib1=0,fib2=1,fib=0;
if (n==0)
fib=0;
else if (n==1)
fib=1;
else
{
for(int i=2;i<=n;i++)
{
fib=fib1+fib2;
fib1=fib2;
fib2=fib;
}
return fib;
}
}
};
int main()
{
int n,m;
cin>>n;
Solution s;
m=s.Fibonacci(n);
cout<<m;
return 0;
}