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<iostream>
using namespace std;
/*int fibonacci(int n) {
	if (n == 0|| n== 1)return 1;
	else return fibonacci(n - 1) + fibonacci(n - 2);
}*/
int fibonacci(int n) {
	int F[44];
	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;
	return 0;
}

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

using namespace std;

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll) 1e15;

ll F[100];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    F[0] = F[1] = 1;
    FOR(i, N + 1, 2) {
        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<int>v(n+1);
    v[0] = 1, v[1] = 1;
    for(int i = 2; i <= n; i++) v[i] = v[i-1] + v[i-2];
    cout << v[n] << endl;
}

C++: #include<iostream>
using namespace std;
int main(void){
int n;
int a=1,b=1,tmp=1;

cin>>n;

for(int i=2; i<n+1; i++){
  tmp = a + b;
  a = b;
  b = tmp;
}

cout<<tmp<<endl;

return 0;
}

C++: #include <iostream>

using namespace std;

int fib(int n);

int main() {
    int n;
    int dp[45];

    //?????????
    /* ??????3-1 */
    dp[0] = 1;
    /* ??????3-2 */
    dp[1] = 1;

    //??\???
    cin >> n;

    //DP
    for (int i = 2; i <= n; i++) {
        /* ??????3-3 */
        dp[i] = dp[i-1] + dp[i-2];
    }

    //??????
    cout << dp[n] << endl;

    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n;

  int n1,n2,st;
  n1=1;
  n2=1;
  st=1;

  cin >>n;

  for(int i=1;i<n;i++){
    st=n1+n2;
    n1=n2;
    n2=st;
  }
  cout <<st<<endl;

}

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


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

C++: #include <iostream>

using namespace std;

typedef long long signed int ll;

constexpr ll NIL = -20000000000;

ll fib(int n) {
    if(n < 3) return n;
    return fib(n-1) + fib(n-2);
}

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

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

int main(){
  int n;
  cin >> n;
  n++;
  vector<int> dp(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-1] << endl;
}

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

#define REP(i,m,n) for(int i=(m); i<(int)(n); i++)
#define RREP(i,m,n) for(int i=(int)(n-1); i>=m; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define aut(r,v) __typeof(v) r = (v)
#define each(it,o) for(aut(it,(o).begin()); it!=(o).end(); ++it)
#define reach(it,o) for(aut(it,(o).rbegin()); it!=(o).rend(); ++it)
#define fi first
#define se second
#define debug(...) {cerr<<"[L"<<__LINE__<<"] "; _debug(__VA_ARGS__);}

template<typename T1, typename T2> ostream& operator<<(ostream& o, const pair<T1, T2>& p)
{return o<<"("<<p.first<<", "<<p.second<<")";}
template<typename T>string join(const vector<T>&v, string del=", ")
{stringstream s;rep(i,v.size())s<<del<<v[i];return s.str().substr(del.size());}
template<typename T>ostream& operator<<(ostream& o, const vector<T>&v)
{if(v.size())o<<"["<<join(v)<<"]";return o;}
template<typename T>ostream& operator<<(ostream& o, const vector<vector<T> >&vv)
{int l=vv.size();if(l){o<<endl;rep(i,l){o<<(i==0?"[ ":",\n  ")<<vv[i]<<(i==l-1?" ]":"");}}return o;}
template<typename T>ostream& operator<<(ostream& o, const set<T>& st)
{vector<T> v(st.begin(),st.end());o<<"{ "<<join(v)<<" }";return o;}
template<typename T1, typename T2>ostream& operator<<(ostream& o, const map<T1, T2>& m)
{each(p,m){o<<(p==m.begin()?"{ ":",\n  ")<<*p<<(p==--m.end()?" }":"");}return o;}
inline void _debug(){cerr<<endl;}
template<class First, class... Rest>
void _debug(const First& first, const Rest&... rest){cerr<<first<<" ";_debug(rest...);}

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;

const double PI = (1*acos(0.0));
const double EPS = 1e-9;
const ll INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const ll mod = 1e9 + 7;

inline void finput(string filename) {
    freopen(filename.c_str(), "r", stdin);
}

int main(){
    ios_base::sync_with_stdio(0);
    // finput("./input");

    int n; cin >> n;
    vi dp(n+1);
    dp[0] = dp[1] = 1;
    REP(i,2,n+1) dp[i] = dp[i-1] + dp[i-2];
    cout << dp[n] << endl;
    return 0;
}

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

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

    std::vector<int> vec(n + 1);
    vec.at(0) = 1;
    vec.at(1) = 1;
    for(int i = 2; i <= n; ++i){
        vec.at(i) = vec.at(i - 1) + vec.at(i - 2);
    }

    std::cout << vec.at(n) << std::endl;

    return 0; 
}

C++: //Fibonacci Number
#include <iostream>

using namespace std;

const int NIL = -1;

int fibonacci(int fib[], int n) {
    if(fib[n] != NIL) return fib[n];
    fib[n] = fibonacci(fib, n - 1) + fibonacci(fib, n - 2);
    return fib[n];
}

int main() {
    int n;
    cin >> n;
    int fib[n + 1];
    for(int i = 0; i < n + 1; i++) {
        fib[i] = NIL;
    }
    fib[0] = 1;
    if(n > 0) fib[1] = 1;

    cout << fibonacci(fib, n) << endl;
}

C++: #include <iostream>

using namespace std;

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