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 <algorithm>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <tuple>
#include <functional>
#include <numeric>
#include <cmath>
#include <iomanip>
#include <map>
#include <random>
#include <cstdlib>
#define INT_MAX 2147483647
#define INT_MIN -2147483646
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
using namespace std;
typedef long long int ll;

vector<ll> A(100);

int main() {
	int n;
	cin >> n;
	if (n == 0) cout << 1 << endl;
	else if (n == 1) cout << 1 << endl;
	else {
		A[0] = 1;
		A[1] = 1;
		for (int 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 A[51];

void func(int n){
  if(n==50) return;
  A[n]=A[n-1]+A[n-2];
  func(n+1);
}

int main(){
  int n;
  cin >> n;
  A[0]=1; A[1]=1;
  func(2);

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

C++: #include <cstdio>

using namespace std;

int sum = 0;

int fib( int n ){

    if( n >= 0) {

        if( n == 0 || n == 1 ){

            return 1;

        } else {

            sum = fib( n - 1 ) + fib( n - 2 );        

        }

    } else return 0;

    return sum;

}

int main(){

    int n;

    scanf("%d", &n);

    int ans = fib(n);

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

}

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

int fib[46]={};
int n = 0 ;

int main(){
    
	cin >> n ;

	fib[0]=1;
	fib[1]=1;

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


cout << fib[n] << endl ;

  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <functional>
#include <complex>
#include <cmath>
#include <ccomplex>
using namespace std;

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

	int dp[50];
	dp[0] = 1;
	dp[1] = 1;

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

C++: #include<cstdio>

int f(int n)
{
    if(n==1||n==0) return 1;
    else return f(n-1)+f(n-2);
}
int main()
{
    int n;
    while(~scanf("%d",&n)) printf("%d\n",f(n));
    return 0;
}

C++: #include<iostream>
#include<string>
#include<stdlib.h>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<deque>
using namespace std;
long long int memo[45];
long long int fib(int n)
{
	if (n < 0)return 0;
	if (memo[n] != -1500)return memo[n];
	if (n == 0 || n == 1)return 1;
	long long int ans = 0;
	ans += fib(n - 1) + fib(n - 2);

	return memo[n]=ans;
	
}

int main()
{
	int n; cin >> n; for (int i = 0; i < 45; i++)memo[i] = -1500;
	cout << fib(n) << endl;
}

C++: #include<cstdio>
#include<iostream>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<list>
#include<map>
#include<algorithm>

using namespace std;

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

    vector<int> dp(n + 1);
    dp[0] = 1;
    dp[1] = 1;
    for (int i = 2; i < n + 1; i++) {
        dp[i] = dp[i - 2] + dp[i - 1];
    }

    cout << dp[n] << endl;

    return 0;
}

C++: #include <bits/stdc++.h>
#include<algorithm>
#define int long long
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
static const double pi = 3.141592653589793;
#define MOD 1000000007
#define INF 10000000000000

int calc(int m, int n){
int ans=1;
while(n>0){
  if(n&1) ans=m*ans%MOD;
  m=m*m%MOD;
  n>>=1;
}
return ans;
}

int kinv(int k){
  return calc(k,MOD-2);
}

int fib[46];
signed main(){
  rep(i,46){fib[i]=0;}
  fib[0]=1;
  fib[1]=1;
  rep(i,44){
    fib[i+2]=fib[i]+fib[i+1];
  }
  int n;
  cin>>n;
  cout<<fib[n]<<endl;
}

C++: //INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
#define dcml(n) fixed<<setprecision(n)
//CONST
//------------------------------------------
const ll INF=1010000000000000017LL;
const ll MOD=1000000007LL;
const ld EPS=1e-12;
const ld PI=3.14159265358979323846;
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define  FORS(i,m,n) for(ll (i)=(m);   (i)<=(n); (i)++)
#define  RFOR(i,m,n) for(ll (i)=(n)-1; (i)>=(n); (i)--)
#define RFORS(i,m,n) for(ll (i)=(n);   (i)>(n);  (i)--)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
#define WREPS(i,in,j,jn) REPS(i,in)REPS(j,jn)
//-----------------------------------------
//namespace
using namespace std;
//ライブラリはここに
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

//-----------------------------------------
int main(void){
    ll N;cin>>N;
    ll dp[N+1];dp[0]=dp[1]=1;
    FORS(i,2,N){
        dp[i]=dp[i-1]+dp[i-2];
    }
    cout<<dp[N]<<"\n";
}

C++: #include <iostream>
#include <vector>
#include <array>

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

  int fib[100];
  fib[0] = 1;
  fib[1] = 1;
  for (int i=2; i<=n; ++i)
    fib[i] = fib[i-1] + fib[i-2];
  std::cout << fib[n] << std::endl;
}

C++: #include<iostream>

using namespace std;


int main(){
  int n,i,note[46];
 cin >> n;

 note[0] = note[1] = 1;

for(i=2;i<=n;i++) note[i] = note[i-1] + note[i-2];

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

C++: // fibonacci number.
#include<stdio.h>

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

C++: #include <iostream>

int Fib[45];

int main(){
  int n;
  std::cin >> n;
  Fib[0]=Fib[1]=1;

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

  return 0;
}