Go: package main

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

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

// func main(){
// 	sc := bufio.NewScanner(os.Stdin)
// 	sc.Scan()
// 	n, _ := strconv.Atoi(sc.Text())
// 	fmt.Println(fib(n))
// }

import (
	"fmt"
)

func main(){
	var n, pre1, pre2, now int
	fmt.Scan(&n)
	if n == 0 || n == 1{
		fmt.Println(1)
	} else {
		pre1, pre2 = 1, 1
		for i:=1; i<n; i++{
			now = pre1 + pre2
			pre2 = pre1
			pre1 = now
		}
		fmt.Println(now)
	}

}

C++: #include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
//#include <unistd.h>
//#include <stdio.h>
#define rep(i,x) for(ll i = 0;i<x;i++)
#define all(a) (a).begin(),(a).end()
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll inf = 2147483647;
const ll INF = 1LL << 60;
const ll mod = 1000000007;
const ld pi = 3.14159265358;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return true;}return false;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return true;}return false;}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
//素数判定O(sqrt(N))
bool isp(ll n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}

ll fac[510000], finv[510000], inv[510000];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < 510000; i++){
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}

// 二項係数計算
ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
//nのm乗をMODで割ったあまりO(logN)
ll modpow(ll n,ll m,ll MOD){
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n) % MOD;
        m >>= 1;
        n *= n;
        n %= MOD;
    }
    return res;
}

//printf("%.10f\n", N);
/*  vector<ll> vec = {1,2,5,6,8,9,10};
    cout << binary_search(all(vec),5) << endl; -> true*/
/*
    vector<ll> vec = {1,2,5,6,8,9,10};
    auto n = upper_bound(all(vec),4);
    cout << *n << endl; -> 5*/

//    cout << fixed << setprecision(15);

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    vector<ll> memo(50);
    memo[0] = 1;memo[1] = 1;
    for(ll i = 2;i < 50;i++){
        memo[i] = memo[i - 1] + memo[i - 2];
    }
    ll n;
    cin >> n;
    cout << memo[n] << endl;
}

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


void fibonacci(int n){
  vector<int> fib;

  fib.push_back(1);
  fib.push_back(1);

  if(n < 2){
    cout << "1" << endl;
  }else if(n == 2){
    fib.push_back(fib.at(0) + fib.at(1));
    cout << fib.back() << endl;
  }else{
    for(int i = 2;i < n;i++){
      fib.push_back(fib.at(i - 2) + fib.at(i - 1));
    }
    cout << fib.back() << endl;
  }

}

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

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <set>
#include <algorithm>
#include <array>
#include <complex>
#include <utility>
#include <map>
#include <inttypes.h>


int main(){
	int N;
    
    std::cin >> N;
    int F[100];
    F[0]=F[1]=1;
    for(int i=2;i<=N;i++){
        F[i]=F[i-1]+F[i-2];
    }
    std::cout << F[N]<< std::endl;
    return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

int main (){
	int n;
	cin >> n;
	int a[45];
	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 main(void){
    int f[100];
    f[0]=f[1]=1;
    int n,i;
    cin>>n;
    
    for(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 main()
{
	int n;
	cin >> n;
	vector<long long> dp(n + 1, 1);
	for (int i = 2; i <= n; i++) {
		dp[i] = dp[i - 2] + dp[i - 1];
	}
	cout << dp[n] << endl;
	return 0;
}

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

int main()
{
	int n,i;
	int a[25];
	cin >> n;
	for(i=0;i<n;i++){
		cin >> a[i];
	}
}

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

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

#define MAX_N 45
vector<int> v(MAX_N,-1);

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


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

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

using namespace std;

void solve()
{
	vector<int> fibo;
	fibo.push_back(1);
	fibo.push_back(1);
	for (int i = 2; i <= 44; ++i)
	{
		fibo.push_back(fibo[i - 1] + fibo[i - 2]);
	}
	int n;
	cin >> n;
	cout << fibo[n] << endl;
}

int main()
{
	solve();
	return(0);
}

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

int main(){
    int n, A[45];
    cin >> n;
    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>
#include <vector>
using namespace std;

int main() {
	int N;
	cin >> N;
	if( N >= 2){
		vector<unsigned> f;
		f.push_back(1);
		f.push_back(1);
		for(int i = 2; i <= N; i++){
			int temp = f.at(i-1) + f.at(i-2);
			f.push_back(temp);
		}
		cout << f.at(N) << endl;;
	}else{
		cout << 1 << endl;
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<n; ++i)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define F first
#define S second
#define PB push_back
#define MP make_pair 
using namespace std;
typedef unsigned long ul;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef pair<int, int> pi;
const int INF = 100100100;
const unsigned int MOD = 1000000007;

bool is_prime(int n) { for (int i = 2; i*i <= n; ++i) { if (n % i == 0) return false; } return true; }
template<class T> inline void chmin(T& a, T b) { if (a > b) { a = b; } }
template<class T> inline void chmax(T& a, T b) { if (a < b) { a = b; } }

ll dp[50];
int N;

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

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


int fib(int n , int t , int p1 , int p2){

  if( n==t )return p1+p2;

  return fib(n+1,t,p2,p1+p2);
  
}


int main(){

  int n;

  cin >> n;

  if(n==0 || n==1)cout << 1 << endl;
  else
    cout << fib(2,n,1,1) << endl;

  return 0;
}