import std.stdio, std.conv, std.string, std.range, std.array, std.algorithm;
import std.bigint;

int dp[45];

void main()
{
  int n = readln().chomp().to!int;
  dp[0 .. 45] = -1;
  writeln(fibo(n));
}

int fibo(int n)
{
  if (dp[n] != -1) return (dp[n]);
  if (n == 0 || n == 1) return (1);
  return (dp[n] = fibo(n - 1) + fibo(n - 2));
}