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 <map>
#include <set>
#include <list>
#include <cmath>
#include <deque>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <utility>
#include <iostream>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>

using namespace std;

#define ll long long
#define ull unsigned long long
#define INF (1 << 30)
#define LLINF (1LL << 62)
#define MOD7 1000000007
#define MOD9 1000000009
#define eps 1e-9
#define P pair<int, int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pul pair<ull, ull>
#define all(a) (a).begin(), (a).end()
#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)

void YES() { cout << "YES\n"; }
void NO() { cout << "NO\n"; }
void Yes() { cout << "Yes\n"; }
void No() { cout << "No\n"; }
void yes() { cout << "yes" << endl; }
void no() { cout << "no" << endl; }

template<class T>
T fibonacci(T n) {
	T first = 1, second = 0, ans;
	for (int i = 0; i < n; ++i) {
		if (i == 1)
			second = 1;
		ans = first + second;
		first = second;
		second = ans;
	}
	return ans;
}

int main() {
	int n;
	cin >> n;
	cout << fibonacci(n + 1) << endl;

	return 0;
}

C++: #include <iostream>
using namespace std;
int n,a[45];

int main(){
	cin >> n;
	a[1] = a[0] = 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 <cstdio>
#include <cstdlib>
#include <cassert>
#include <string>
#include <cstring>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>

using namespace std;

// ---------------------
// repetition
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

// debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

// ---------------------
#define INF 922337203685477580
typedef long long ll;

int dp[50];

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

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

  REP(i, 50) {
    dp[i] = -1;
  }

  cout << fib(X) << endl;
  return 0;
}

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

int n, a[45];

int main() {
    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;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0;i<int(N);++i)
#define rep1(i,N) for(int i=1;i<int(N);++i)
#define all(a) (a).begin(),(a).end()		//sort(all(vi S)) sort(all(string S))

typedef long long ll;
typedef vector<int> vi;
typedef set<int> seti;
typedef vector<string> vs;

const int MOD = 1e9+7;
const int INF = 1e9;

int main() {
	int N;
	cin>>N;
	ll F[100];
	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 <iostream>

using namespace std;

int main(){
  long long int a = 1, b = 1;
  int n; cin >> n;

  for(int i=0;i<n;++i){
    long long int c = a + b;
    a = b;
    b = c;
  }
  cout << a << endl;

  return 0;
}

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

int fib(int n, int a, int b);

int main()
{
	int n;
	cin >> n;
	cout << fib(n - 2, 1, 1) << endl;
	return (0);
}


int fib(int n, int a, int b){
	int f;
	if (n != 0){
		f = fib(n - 1, a + b, a);
  }
	else f = a + b;
	return (f);
}

C++: #include<iostream>
using namespace std;
int fib(int n)
{
    int F[50];
    if(n<=1) return 1;
    for(int i = 2 ; i < =n; i++)
    {
        F[i] = F[i-1] + F[i-2];
    }
    return F[n];
}

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

C++: #include <iostream>

using namespace std;

int ans[45] = 0;

int fib(int n) {
	if (n <= 1) return 1;
	int a = ans[n];
	if (a) return a;
	a = fib(n-1) + fib(n-2);
	ans[n] = a;
	return a;
}

int main()
{
	int i = 0;
	cin >> i;
	cout << fib(i) << endl;
}

C++: #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--)

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>


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


int main(int argc, const char * argv[]) {
    
    //Input
    int n;
    scanf("%d", &n);
    
    printf("%d\n", fib(n));
           
    return 0;
}

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

int main(void){
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n; cin >> n;
  vector<int> f(n+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 <cstdio>

using namespace std;

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

int main() {
    int n;
    scanf("%d", &n);
    printf("%d", fibonacci(n));
}

C++: #include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    int n;
    cin >> n;
    int a[50];
    a[0] = 1;
    a[1] = 1;
    for(int i = 2;i < 50;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;
	std::vector<int>a(n);
	a[0]=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 <bits/stdc++.h>
using namespace std;


int n;

int memo[50];

int fibo(int n) {
	if(n==1 || n == 0) return 1;
	if(memo[n] != -1) return memo[n];
	return memo[n] = fibo(n-1) + fibo(n-2);
}

int main(){
	scanf("%d", &n);

	for(int i=0;i<50;i++)memo[i] = -1;
	printf("%d\n",fibo(n));
	return 0;
}