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 <iostream>
#include <vector>

using namespace std;

int fib(int);

vector<int> num;

int main(){
    int n;
    cin >> n;
    
    num.resize(n, 0);
    
    cout << fib(n) << endl;
}

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

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

int f[45];

int fib(int n)
{
    if (n == 1 || n == 0)
        return 1;
    if (f[n] != -1)
        return f[n];

    return (f[n] = fib(n - 1) + fib(n - 2));
}

int main()
{
    int n;
    cin >> n;

    for (int i = 0; i < 46; i++)
        f[i] = -1;

    cout << fib(n) << endl;
}

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

typedef long long ll;

int main()
{
    ll i,j;
    ll n;
    cin >> n;
    vector<ll> Fib(n+1,1);
    for(i = 2;i <= n;++i){
        Fib.at(i) = Fib.at(i-1) + Fib.at(i-2);
    }
    cout << Fib.at(n) << endl;

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (1e9)
#define INFL (1e18)
 
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
template<class T>using arr=vector<vector<T>>;
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} cout << a[a.size()-1] << endl;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
 
vector<ll> fibs(100, -1);
ll fib(int n){
    if(fibs[n]!=-1) return fibs[n];
    if(n==0 || n==1) return 1;

    return fibs[n] = fib(n-2) + fib(n-1);
}

int main()
{
    int n; cin >> n;
    pr(fib(n));
    return 0;}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int f1=0,f2=1,n,xx;
    cin>>n;
    for (int i=1;i<=n;i++)
    {
       xx=f2;
        int next = f1 + f2;
        f1 = f2;
        f2 = next;
}
printf("%d\n",f2);
}

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

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ")
{ if (!v.size()) puts(""); rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

vector<lint> Fib{0, 1, 1};
lint fib(int k) {
  if (k < 0) return 0;
  if (k == 0) return 0;
  if (k < 3) return 1;
  if (Fib.size() <= k + 1) {
    Fib.push_back(fib(k - 1) + fib(k - 2) /* % mod */);
  }

  return Fib[k];
}

signed main() {
  cout << fib(in() + 1) << endl;
}

C++: #include <iostream>
#include <vector>
#define eol '\n'
using namespace std;

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  
  int n;
  cin >> n;

  vector<int> list(n,0);
  list[0] = list[1] = 1;
  

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

  cout << list[n] << eol;
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define rp(i,j) for(long long i=0;i<j;i++)
#define rep(i,j,k) for(long long i=j;i<k;i++)
#define mod 1000000007
typedef long long ll;
int main(){
    int n;cin>>n;
    int dp[50];
    rp(i,50){
        if(i==0||i==1)dp[i]=1;
        else dp[i]=dp[i-1]+dp[i-2];
    }
    cout<<dp[n]<<endl;
}

C++: #include "iostream"

using namespace std;

int F[46];

int fib( int n ) {

	if (F[n] != 0) return F[n];

	if (n == 0 || n == 1) F[n] = 1;

	else F[n] = fib(n - 1) + fib(n - 2);

	return F[n];
}

int main() {


	int n;

	cin >> n;

	cout << fib(n) << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int dp[50];

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

int main(void){
  int n; cin >> n;
  rep(i,50) dp[i] = -1;
  cout << fibonacci(n) << 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++: #include<iostream>
using namespace std;

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

C++: #include <iostream>
int F[100];
int main() 
{
int n;
F[0] = 1;
F[1] = 1;
for (int i=2; i<45; ++i) 
{ // ???????????????
F[i] = F[i-2]+F[i-1];
}
cin>>n;
cout<<F[n];
}

C++: /**
*    created: 12.05.2020 12:38:55
**/
#include <bits/stdc++.h>
#define int long long
const int INF = 1e18L + 5;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

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


    return 0;
}

C++: #include <stdlib.h>
#include <stdio.h>

int fib(int n){
int i;
int a[25];
a[0]=a[1]=1;
for(i=2;i<=n;i++){
a[i]=a[i-1]+a[i-2];
   }
return a[n];
}

int main(){

int x,n;
scanf("%d",&n);
x=fib(n);
printf("%d",x);

return 0;
}