Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func ceil(a, b int) int {
	if a%b == 0 {
		return a / b
	} else {
		return a/b + 1
	}
}

// Sort
type RuneSlice []rune

func (a RuneSlice) Len() int           { return len(a) }
func (a RuneSlice) Less(i, j int) bool { return a[i] < a[j] }
func (a RuneSlice) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

// Main
func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	N := sc.nextInt()
	dp := make([]int, N+1)
	dp[0] = 1
	dp[1] = 1
	for i := 2; i <= N; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}

	fmt.Fprintln(wtr, dp[N])
	wtr.Flush()
}

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

#define FOR( i, m, n )  for( int (i) = (m); (i) < (n); (i)++ )
#define REP( i, n )     FOR( i, 0, n )
#define ALL( a )        (a).begin(), (a).end()             

int main() {
	int n; cin >> n;
	int dp[50];
	dp[0] = dp[1] = 1;

	FOR( i, 2, n + 1 ) dp[i] = dp[i - 1] + dp[i - 2];

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

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

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

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

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

int main() {
    int n;
    cin >> n;
    int dp[n+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;
}

C++:     #include <bits/stdc++.h>
    #define rep(i,n) for(int i = 0; i < (n); i++)
     
    using namespace std;
    
    int main() {
   
    int n;
    scanf("%d",&n);
    int ans = 0;
    int second = 0;
    for(int i = 0; i <= n; i++){
    	if(i == 0 || i == 1){	ans = 1;
    	} else{
    		if(i == 2){
    			second = 1;
    		    ans = 1;
    		}
    		int t = second;
    		second = ans;
    		ans = ans + t;
    	}
    }
    	printf("%d\n",ans);
    
     return 0;
    }

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

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;
}