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;

int main(){

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

    int n; cin >> n;
    cout << fib[n] << endl;
    return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
using namespace std;
int dp[50];
int main(){
	int n;
	cin>>n;
	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 <bits/stdc++.h>

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define debug(x) cerr << x << " " \
                      << "(L:" << __LINE__ << ")" << '\n'

//DP法
template <class T>
inline bool chmin(T &a, T b) //change minimum
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T &a, T b) //change max
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}

typedef long long ll; //64bit型
using namespace std;

const long long INF = 1LL << 60; //無限大の値
int N;
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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
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; }
const ll INF = 1LL << 60;
const int MAX = 1000000010;
const ll MOD = 1000000007;
const double PI = acos(-1);

int main() {
    int N; cin >> N;
    vector<int> 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;
    return 0;
}

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

int f[50];

int fibo(int n)
{
  if(n <= 1) return 1;
  return f[n] = fibo(n-1)+fibo(n-2);
}

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

  cout << fibo(n) << endl;
  return 0;
}

C++: #include <cstdio>
using namespace std;
unsigned long long fib[45];
int main() {
    fib[0] = 1;
    fib[1] = 1;
    int n;
    scanf("%d", &n);
    for (int i = 2; i <= n; i++) {
    	fib[i] = fib[i - 1] + fib[i - 2];
	}
	printf("%lld\n", fib[n]);
    return 0;
}

C++: #include <iostream>
using namespace std;
int F[100];
int Fibonacci(int N) {
  F[0] = 1;
  F[1] = 1;

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


  int N;
  cin >> N;
  cout << Fibonacci(N)<<endl;
}

C++: #include<bits/stdc++.h>

#define rep(i,n) for(int (i)=0;(i)<(n);++(i))
#define FOR(i,a,b) for(int (i)=(a);i<(n);++(i))
#define ALL(obj) (obj).begin(),(obj).end()
#define space <<" "<<
using namespace std;

    vector<long> dp;

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

int main(){

    int n;
    cin>>n;

    dp.assign(n+1,-1);
    cout <<fib(n)<< endl;
   
}

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n, f[50] = {0};
  cin >> n;
  f[0] = f[1] = 1;
  for(int i = 2; i <= n; i++) f[i] = f[i - 1] + f[i - 2];

  cout << f[n] << endl;
}

C++: #include <stdio.h>

int fib(int);

int main()
{
  int n,total=0;

  scanf("%d",&n);

  total=fib(n);

  printf("%d\n",total);

 
  return 0;
}    


int fib(int n){

  static int total=0;

  if(n==0) return ++total;
  else if (n==1) total++;
  else fib(n-1)+fib(n-2);
}

C++: #include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include<cstdio>
#include <vector>
#include<queue>
#include<limits.h>
#include<string.h>
#include<functional>
#include<map>
#include<set>
#include<list>
#include<unordered_map>
#include<queue>
#define int long long
using namespace std;

signed main(){
	int a; cin >> a;
	int b = 0, c = 1;
	for (int d = 0; d < a; d++) {
		int e = b + c;
		b = c;
		c = e;
	}
	cout << c << endl;
}

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 n;
  long long int fib1,fib2,fib3;
  cin>>n;
  fib1=1;
  fib2=1;
  for(int i=0;i<n-1;i++){
    fib3=fib1+fib2;
    fib1=fib2;
    fib2=fib3;
  }
  cout<<fib3<<endl;
}

C++: // Algorithms and Data Structures 1
// Fibonacci Numbers
// Name: Ryuya Asada
// ID: s1260064

#include <iostream>

int fibonacci(int);

int main() {
    int n(0);
    std::cin >> n;

    std::cout << fibonacci(n) << "\n";

    return 0;
}

int fibonacci(int n) {
    int a(0), b(1), c(1);
    for(int i=1; i <= n; ++i) {
        c = a + b;
        a = b;
        b = c;
    }

    return c;
}