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++: #pragma GCC optimize ("O3")

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include <prettyprint.hpp>
#define debug(...)  cerr << "[" << #__VA_ARGS__ << "]: ", d_err(__VA_ARGS__);
#else
#define debug(...) 83;
#endif

void d_err() {
    cerr << endl;
}

template <typename H, typename... T>
void d_err(H h, T... t) {
    cerr << h << " ";
    d_err(t...);
}

template <typename T>
void print(T x) {
    cout << x << "\n";
}

#define ALL(x) (x).begin(), (x).end()
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define REVFOR(i, m, n) for (int i = (n - 1); i >= (m); --i)
#define REP(i, n) FOR(i, 0, n)
#define REVREP(i, n) REVFOR(i, 0, n)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define bcnt __builtin_popcountll

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<ll,ll> Pll;
typedef pair<int,int> Pin;

ll INF = 1e16;
int inf = 1e9;
ll MOD = 1e9+7;


int main() {
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    int n; cin >> n;

    vll v(n + 1);
    v[0] = 1;
    v[1] = 1;

    FOR(i, 2, n + 1) {
        v[i] = v[i - 1] + v[i - 2];
    }

    print(v[n]);

}

C++: #include<iostream>
using namespace std;
int main(){
	int a[45];
	a[0]=1;
	a[1]=1;
	int n,i;
	cin>>n;
	if(n>=2){
		for(i=2;i<=n;i++){
			a[i]=a[i-1]+a[i-2];
		}
	}
	cout<<a[n]<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int memo[1000];
int fib(int n){
    if(n == 0 || n == 1){
        return (memo[n] = 1);
    }else{
        if(memo[n-2] == 0) memo[n-2] = fib(n-2);
        if(memo[n-1] == 0) memo[n-1] = fib(n-1);
        if(memo[n] == 0) memo[n] = memo[n-2] + memo[n-1];
        return memo[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;

int F[100];

int Fibo(int k){
    if(k == 0 || k == 1){
        return F[k] = 1;
    } else if(F[k] != 0){
        return F[k];
    } else {
        return F[k] = Fibo(k-2) + Fibo(k-1);
    }
}

int main() {
    int n; cin >> n;
    int ans = Fibo(n);
    cout << ans << endl;

    return 0;
}

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


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

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

int fib(int n){
    if (n == 0) return 1;
    if (n == 1) return 1;
    return fib(n - 1) + fib(n - 2);
}

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

C++: #include<bits/stdc++.h>
#include<string>
#include<vector>
using namespace std;
typedef pair<int, int>P;
typedef long long ll;
#define rep(i,n)for(ll i=0;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;
const ll MAX_N = 100010;
//max=({});
//条件式が真ならwhileの中身を回し続ける
//printf("%d\n", ans);

//pairの入力
//vector<pair<ll, ll>>work(n);
//rep(i, n) {
//	ll a, b;
//	cin >> a >> b;
//	work[i] = make_pair(a, b);
//for(auto p:mp)(mapの探索)
//printf("%.10f\n",なんちゃら)
//最大公約数
ll gcd(ll x, ll y) {
	return y ? gcd(y, x % y) : x;
}

ll lcm(ll x, ll y) {
	if (x == 0 || y == 0)return 0;
	return (x / gcd(x, y) * y);
}

//素因数分解
map<ll, ll>ins;
void facterize(ll n) {
	ll a = 2;
	while (n >= a * a) {
		if (n % a == 0) {
			ins[a]++;
			ins[a] = ins[a] % 1000000007;
			n /= a;
		}
		else {
			a++;
		}
	}
	ins[n]++;
}

vector<ll>relation[20], money(20, 1);
int dp[110][110];

int keta(int x) {
	int y = 0;
	while (x > 0) {
		y++;
		x /= 10;
	}
	return y;
}

ll dx[4] = { 0,0,-1,1 };
ll dy[4] = { -1,1,0,0 };

//long longしか使わない
int main() {
	ll n;
	cin >> n;
	vector<ll>f(n + 1);
	f[0] = 1;
	f[1] = 1;
	for (ll i = 2;i <= n;++i) {
		f[i] = f[i - 1] + f[i - 2];
	}
	cout << f[n] << endl;
	return 0;
}

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

int fib(int n)
{
  int num[10000] = {1, 1};
  for (int i = 2; i <= n; i++){
    num[i] = num[i - 1] + num[i - 2];
  }
  return (num[n]);
}

int main()
{
  int n;
  cin >> n;
  cout << fib(n) << endl;
}

C++: #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
using namespace std;
long long int f[50];

long long int fib(int n){
    if(f[n]!=0);
    else 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<iostream>
using namespace std;
int function(int n)
{
    if(n==0||n==1)
        return 1;
    else
        return function(n-1)+function(n-2);
}
int main()
{
    int n;
    cin>>n;
    cout<<function(n);
    return 0;
}

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

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

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

  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>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int f[50];
int main() {
	int n; scanf("%d", &n);
	f[0] = f[1] = 1;
	for (int i = 2; i <= n; i++)f[i] = f[i - 2] + f[i - 1];
	printf("%d\n", f[n]);
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    int d[n+1];
    d[0] = 1;
    d[1] = 1;
    for (int i = 2; i < n+1; i++)
    {
        d[i] = d[i-1] + d[i-2];
    }
    
    cout << d[n] << endl;
}