Go: package main

import (
	"bufio"
	"io"
	"os"
	"strconv"
	"fmt"
)

var (
	nstr   func() string
	stdout *bufio.Writer
)

func init() {
	nstr = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func main() {
	defer stdout.Flush()
	n := nint()
	r := fibonacci(n)
	fmt.Println(r)
}

func fibonacci(n int) int{
	if n == 0 || n == 1{
		return 1
	}else{
		fiList := make([]int, n+1)
		fiList[0] = 1
		fiList[1] = 1
		for i:=2; i<n+1; i++{
			fiList[i] = fiList[i-1] + fiList[i-2]
		}
		return fiList[n]

	}

}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func nint64() int64 {
	i, err := strconv.ParseInt(nstr(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func nint() int {
	return int(nint64())
}

func getIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = nint()
	}
	return b
}

func getStringSlice(n int) []string {
	b := make([]string, n)
	for i := 0; i < n; i++ {
		b[i] = nstr()
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}

func contains(s []int, e int) bool {
	for _, a := range s {
		if a == e {
			return true
		}
	}
	return false
}

func bin(i int, prefix bool) string {
	i64 := int64(i)

	if prefix {
		return "0b" + strconv.FormatInt(i64, 2)
	} else {
		return strconv.FormatInt(i64, 2)
	}
}

func strReverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

C++: #include "bits/stdc++.h"
using namespace std;
using ll = long long; using ull = unsigned long long;
#define int ll
using vb = vector<bool>; using vvb = vector<vb>;
using vi = vector<int>; using vvi = vector<vi>;
using vl = vector<ll>; using vvl = vector<vl>;
using pii = pair<int,int>; using pll = pair<ll,ll>;
#define FOR(i,a,b) for(ll i = (a); i < (ll)(b); ++i)
#define REP(i,n) FOR(i,0,n)
#define RFOR(i,a,b) for(ll i = (ll)(b)-1;i >= a;--i)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define eb(val) emplace_back(val)
const double PI = acos(-1);
const double EPS = 1e-10;
const ll MOD = 1e9+7;
void cioacc(){//accelerate cin/cout
  cin.tie(0);
  ios::sync_with_stdio(false);
}
pair<vl,vb> eratosthenes_sieve(ll n){
  vb is_prime(n+1,true);
  vl prime;
  is_prime[0] = false;
  is_prime[1] = false;
  FOR(i,2,sqrt(n)+1){
    if(!is_prime[i]) continue;
    for(ll j=2*i;j<=n;j+=i) is_prime[j] = false;
    prime.eb(i);
  }
  return {prime,is_prime};
}
signed main(){
  int n;
  cin >> n;
  vi fib(n+1,1);
  REP(i,n-1) fib[i+2] = fib[i+1]+fib[i];
  cout << fib[n] << endl;
}

C++: //#define		FILE_INPUT_DEFINE
#ifdef		FILE_INPUT_DEFINE
#include	<fstream>
#endif		// FILE_INPUT_DEFINE

#include	<iostream>

using namespace std;

#define		MAX			45

int main()
{
#ifdef		FILE_INPUT_DEFINE
	// input from txt
	std::ifstream in(R"(C:\Temp\input.txt)");
	std::cin.rdbuf(in.rdbuf());
#endif		// FILE_INPUT_DEFINE

	unsigned int		fib[MAX] = { 1, 1 };

	for (int i = 2; i < MAX; ++i)
	{
		fib[i] = fib[i - 1] + fib[i - 2];
	}

	int		n;
	cin >> n;

	cout << fib[n] << "\n";

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n;

  int n1,n2,st;

  n1=1;
  n2=1;
  st=1;

  cin >>n;

  for(int i=1;i<n;i++){
    st=n1+n1;
    n1=n2;
    n2=st;
  }
  cout <<st<<endl;

}

C++: #define _CRT_SECURE_NO_WARNINGS

#include<fstream>
#include<iostream>
#include<string>
#include<iomanip>
#include<list>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

vector<int> v;
int a[20];
int m;
int n, q;

void dp(int cnt, int value)
{
	if (cnt >= n) {
		v.push_back(value);
		return;
	}
	dp(cnt + 1, value + a[cnt]);
	dp(cnt + 1, value);
}

int main(){
	
	cin >> n;
	int n_1 = 1, n_2 = 1;
	if (n < 2) {
		cout << "1" << endl;
	}
	else {
		for (int i = 2; i < n; i++) {
			n_1 += n_2;
			swap(n_1, n_2);
		}
		cout << n_1 + n_2 << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  int F[50];
  F[0] = F[1] = 1;
  for (int i = 2; i <= n; i++) {
    F[i] = F[i - 1] + F[i - 2];
  }
  cout << F[n] << endl;
  return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
using namespace std;
const int num = 45;
int f[num];
inline int getNumber(int i) {
	if (i == 0 || i == 1)
		return 1;
	int j;
	for (j = 2; j <= i; j++) {
		f[j] = f[j - 1] + f[j - 2];
	}
	j--;
	return f[j];
}
int main() {
	int n;
	cin >> n;
	f[0] = 1;
	f[1] = 1;
	int x = getNumber(n);
	cout << x << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

vector<long long int> fibonatti;
long long int  dp[10000];
int calc(int n){
  if(n <= 1) return 1;
  if(dp[n] != -1)return dp[n];
  fibonatti[n] = calc(n - 1) + calc(n - 2);
  return dp[n] = fibonatti[n];
}

int main(int argc, char *argv[]){
  int n;
  cin >> n;
  fibonatti.resize(n + 1);
  fibonatti[0] = fibonatti[1] = 1;
  for (int i = 0; i <= n; i++) {
    dp[i] = -1;
  }
  dp[0] = dp[1] = 1;
  std::cout << calc(n) << std::endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define All(v) (v).begin(),(v).end()

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    int dp[50];
    dp[0]=1;
    dp[1]=1;
    for(int i=2;i<=n;i++)dp[i]=dp[i-1]+dp[i-2];
    cout<<dp[n]<<endl;
}

C++: #include<iostream>
using namespace std;

int main()
{
	int n, a[50];
	cin >> n;
	a[0] = a[1] = 1;
	for(int i = 2; i <= n; i++)
		a[i] = a[i-1] + a[i-2];
	cout << a[n] << endl;
}

C++: #include <iostream>
#include <vector>
#include <cstdio>
// #include <cstdint>

using namespace std;

static vector<int> M(44, 0);

static inline int fibonacci(int n) {
  if (n == 0 || n == 1) {
    return 1;
  } 

  if (M[n] != 0) {
    return M[n];
  } 
  M[n] = fibonacci(n - 2) + fibonacci(n - 1);
  return M[n];
}

int main() {
  int n;
  cin >> n;
  
  cout << fibonacci(n) << endl;
 
  return 0;
}

C++: #include <iostream>

using namespace std;

int i = 1;
int sum = 1;
int num[2] = {1, 1};
int l = 0;
int fib(int n)
{
  if (i == n) return sum;
  sum += num[l];
  num[l] = sum;
  l = 1 - l;

  if (i != n) {
   i++;
   return fib(n);
  }
}

int main()
{
  int n;
  cin >> n;
  
  if (n == 0) cout << 1 << endl;
  else cout << fib(n) << endl;

  return 0;
}

C++: #include <stdio.h>
#define N 100
#define M -1
int fib(int);

int array[N];
int main()
{
  int i,n;
  scanf("%d",&n);
  for(i=0;i<N;i++)
    {
      array[i]=M;
    }
  printf("%d\n",fib(n));
}

int fib(int x)
{
  if(x==0||x==1)
    {
      return array[x]=1;
    }
  if(array[x]!=M) return array[x];
  else
    {
     return  array[x]=fib(x-2)+fib(x-1);
    }
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
const long long INF=1LL<<60;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using namespace std;

int main(){
int n; cin>>n;
int dp[45];
dp[0]=1; dp[1]=1;
for(int i=2;i<=45;i++){
    dp[i]=dp[i-2]+dp[i-1];
}
cout<<dp[n]<<endl;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define nyan "(=^･ω･^=)"
using namespace std;

const int mod = 1e9 + 7;
const long long INF = 1LL<<60;
//using ll = long long;
//using P = pair<int,int>;

long long dp[50];

long long fibonacci(int n){
    if (n == 0) return dp[0];
    if (n == 1) return dp[1];
    
    if(dp[n]) return dp[n];
    
    return dp[n] = fibonacci(n-1) + fibonacci(n-2);
}

int main(){
    int n;
    cin >> n;
    
    dp[0] = 1, dp[1] = 1;
    
    cout << fibonacci(n) << endl;
}