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;

#define debug(x) cout <<"DEBUG"<<" "<< #x << ":" << x << '\n'

// n回繰り返し
#define rep(i,n) for(int i = 0; i < ((int)(n)); i++)   // 0-indexed昇順
#define rep1(i,n) for(int i = 1; i <= ((int)(n)); i++) // 1-indexed昇順
#define rrep(i,n) for(int i = ((int)(n)-1); i >= 0; i--)  // 0-indexed降順
#define rrep1(i,n) for(int i = ((int)(n)); i >= 1; i--)   // 1-indexed降順
#define all(x) (x).begin(),(x).end()

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vii;  // 2次元配列
typedef vector<ll> vll;
typedef vector<double> vd;
typedef pair<int, int> PII;

template<typename T>
using vec = vector<T>;
template<class T>
using maxheap = std::priority_queue<T>;
template<class T>
using minheap = std::priority_queue<T, std::vector<T>, std::greater<T>>;

template<class T,class U> inline bool chmax(T &a, const U &b){if(a<b){a=b;return 1;}return 0;}
template<class T,class U> inline bool chmin(T &a, const U &b){if(a>b){a=b;return 1;}return 0;}

const ld Pi = std::acos(-1.0L);
const ll infll = (1LL<<62)-1;
const int inf = (1<<30)-1;
const int mod = 1000000007;
// const int mod = 998244353;


/*FUNCs=================================================*/


/*MAIN==================================================*/
signed main(){
    int _StartTime_ = clock();
    cin.tie(nullptr);
    ios::sync_with_stdio(false);   //cin cout 高速化
    // cout << fixed << setprecision(15);

    int n; cin >> n;
    vll fib(n+1);
    fib[0] = fib[1] = 1;
    for(int i = 2; i <= n; ++i) {
        fib[i] = fib[i-1] + fib[i-2];
    }
    cout << fib[n] << '\n';
    // printf("ExcutionTime: %d /ms\n",1000*(int)((clock()-_StartTime_)/CLOCKS_PER_SEC));
}

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

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

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

int main() {
  int x, y;
  int F[50];
  F[0] = F[1] = 1;
  for ( i = 2; i < 50; i++ ) F[i] = F[i-1] + F[i-2];

  cin >> x;
  cout << F[x] << endl;

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int F[114]={};
int fib(int n){
    if(n == 0 || n == 1) return F[n] = 1;
    else if(F[n] != 0) return F[n];
    else {
        return F[n] = fib(n-1) + fib(n-2);
    }
}

int main() {
    ios::sync_with_stdio(false);
    int n;
    cin >>n;
    fib(n);
    cout << F[n] << endl;
    return 0;
}

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

int main()
{
  int n; cin>>n;
  vector<ll> dp(n+1, 0);
  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;

  return 0;
}

C++: #include <iostream>

using namespace std;


int F[45];

int main() {
  F[0] = 1;
  F[1] = 1;
  for (int i = 2; i < 45; ++i) {
    F[i] = F[i-1] + F[i-2];
  }

  int input;
  cin >> input;
  cout << F[input]<< endl;
}

C++: #include<stdio.h>
#define N 100

int F[N];

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

int main(){
    int n;
    scanf("%d",&n);
    printf("%d\n",fibonacci(n));
    return 0;
}

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

int main()
{

	int n;
	cin >> n;

	vector<int64_t> fib(n+1);
	fib[0]=1;
	fib[1]=1;

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

C++: #include<iostream>
using namespace std;
int fib(int n)
{
    int F[50];
    if(n<=1) return 1;
    for(i = 2 ; i < =n; i++)
    {
        F[i] = F[i-1] + F[i-2];
    }
    return F[n];
}

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

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

int n, A[44];

void fibo(){
    A[0] = 1;
    A[1] = 1;
    for (int i = 2; i <= n; i++) A[i] = A[i -1] + A[i -2];
}

int main(){
    cin >> n;
    fibo();
    cout << A[n] << endl;
    return 0;
}

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

int main()
{
    int N;
    cin >> N;
    vector<ll> ans(45, 1);
    ans[0] = 1;
    ans[1] = 1;
    for (int i = 2; i <= N; i++)
    {
        ans[i] = ans[i - 2] + ans[i - 1];
    }
    cout << ans[N] << endl;

    return 0;
}

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

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;


int n;
vector<int> dp;
int main() {
    cin >> n;
    dp.assign(n+1,-1);
    dp[0] = 1;
    dp[1] = 1;
    FOR(i,2,n+1){//i=nまで計算！
        dp[i] = dp[i-1] + dp[i-2];
    }

    cout << dp[n] << endl;
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define len(n) (int)n.length()
#define pb push_back
#define ll long long
#define make_pair mkp
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define ALL(v) (v).begin(), (v).end()
#ifdef DBGPRT
#define dbg(n) cerr << "//" << #n << ":" << n <<endl
#else
#define dbg(n) ;
#endif
typedef pair<ll, ll> LLARR;
#define INF 999999999
const double PI = 3.1415926535897932384626433832795;


vector<ll> memo(50,0);
ll fibo(int n)
{
	if ((n==0) || (n==1))
		return memo[n] = 1;
	
	if (memo[n] != 0)
		return memo[n];
	
	memo[n-1] = fibo(n-1);
	memo[n-2] = fibo(n-2);
	return fibo(n-1) + fibo(n-2);
}

int main()
{
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	
	cout << fibo(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int dp[100];

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