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;

int main(){
    int A; cin>>A;
    vector<int> Ni(A+1,0);
    Ni[0]=1;
    Ni[1]=1;
    for(int i=2;i<=A;i++){
        Ni[i]=Ni[i-1]+Ni[i-2];
    }
    cout<<Ni[A]<<endl;
}

C++: #include <iostream>

using namespace std;

int A[128];
int fib(int n){
  A[0] =1;
  for(int i=1;i<n;++i){
    A[i] =A[i-1];
    if(i>1)A[i]+=A[i-2];
    if(i>2)A[i]+=A[i-3];
  }
  return A[n-1];

}

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

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

int main() {
	int n[100000], s, i;
	n[0] = 1;
	n[1] = 1;

	cin >> s;

	for (i = 2; i <=s; i++) {
		n[i] = n[i-1] + n[i-2];
	}

	cout << n[s] << endl;

	return 0;
}

C++:   /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
int dp[100];
ll fib(ll n){
	if(n==1||n==0) return 1;
	if(dp[n]!=-1) return dp[n];
	return dp[n]=fib(n-1)+fib(n-2);
}
int main()
{
	turbo();
	ll n;
	cin>>n;
	memset(dp,-1,sizeof(dp));
	cout<<fib(n)<<endl;
	return 0;	
}

C++: 
#include<iostream>

using namespace std;

int main()
{
	int n,i;
	int a[44];
	cin >> n;
	a[0]=1;
	a[1]=1;
	a[2]=2;
	for(i=2;i<=n;i++){
		a[i]=a[i-1]+a[i-2];
	}
	cout << a[n] << endl;
}

C++: #include <iostream>
using namespace std;int main(){int a=1,b=1,c;cin>>c;for(int i=c-1;i;--i){swap(a,b);a+=b;}cout<<a<<endl;}

C++: #include <iostream>

using namespace std;

int fib(int n);

int main() {
    int n;

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

    //??????
    cout << fib(n) << endl;

    return 0;
}

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

C++: #include<stdio.h>

int fib(int);

int main()
{
  int a,n;

  scanf("%d",&n);

  if(n == 0 || n == 1){
    printf("%d\n",1);
  }
  else {
    a = fib(3);
    printf("%d\n",a);
  }

  return 0;
}

int fib(int n){

  if(n==0 || n==1){
    return 1;
  }

  return (fib(n-1)+fib(n-2));
}

C++: #include<bits/stdc++.h>
#define ll long long
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(i, n) for(int i=0; i<=n; i++)
#define repr(i, n) for(int i=n; i>0; i--)
#define REPR(i, n) for(int i=n; i>=0; i--)
const ll INF = 1LL<<60;
const int INT_INF = 1e9;
const ll MOD = 1e9+7;
template<class T> void puts(T x) { std::cout << x << std::endl; }
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; }
using namespace std;

int dp[50];

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

    // DP
    for (int i = 0; i < n; i++) {
        dp[i+2] = dp[i] + dp[i+1];
    }
    cout << dp[n] << endl;
}

C++: #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>
using namespace std;


typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
	stringstream ss;
	ss << f;
	ss >> t;
}


#define REP(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define RALL(v) (v).rbegin(),(v).rend()
#define PB push_back


#define MOD 1000000009LL
#define EPS 1e-8

#define NMAX 44
int F[NMAX];

void initialize(){
	for( int i = 0; i < NMAX;  i++ ){
		F[i] = 0;
	}
}

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

int main(){
	int n;
	scanf("%d", &n);
	int ans = fibonacci(n);
	printf("%d\n", ans);
	return 0;
}

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

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

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

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

    int F[n];
    F[0] = F[1] = 1;
    for (int i = 2; i <= n; i++) F[i] = F[i - 2] + F[i - 1];

    cout << F[n] << endl;

    return 0;
}

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

int FibonacciNumber(int n) {

	if (n <= 1) {
		return 1;
	}
	return FibonacciNumber(n - 1) + FibonacciNumber(n - 2);
}

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

	cout << FibonacciNumber(n) <<endl;
	
}

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

using namespace std;

#define ll long long
typedef complex<double> P;

int main() {
  int n; cin >> n;
  int p=1, fib=1;
  if(n == 1 || n == 0) cout << 1 << endl;
  else {
    for (int i = 1; i < n; i++) {
      int t = p;
      p = fib;
      fib += t;
    }
    cout << fib << endl;
  }
}