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 <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <sstream>
#include <vector>
#include <set>
#include <stack>
#include <map>
#include <cmath>
#include <queue>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef unsigned long long ll;
#define MAX_N 100
int d[MAX_N];

void init(){
	rep(i,MAX_N){
		d[i] = -1;
	}
}

int fib(int num){
	if( num == 0) return 1;
	if( num == 1) return 1;
	if(d[num] != -1) return d[num];
	d[num] = fib(num-1) + fib(num-2);
	return d[num];
}


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

C++: #include <stdio.h>
int fib(int);
int fibo[45];
int main(){
  int n,i;
  for(i=0;i<45;i++)fibo[i]=-1;
  scanf("%d",&n);
  printf("%d\n",fib(n));
  return 0;
}
int fib(int n){
  if(n==0 || n==1)return fibo[n]=1;
  if(fibo[n]!=-1)return fibo[n];
  return fibo[n]=fib(n-1)+fib(n-2);
}

C++: 
 // C
 #ifndef _GLIBCXX_NO_ASSERT
 #include <cassert>
 #endif
 #include <cctype>
 #include <cerrno>
 #include <cfloat>
 #include <ciso646>
 #include <climits>
 #include <clocale>
 #include <cmath>
 #include <csetjmp>
 #include <csignal>
 #include <cstdarg>
 #include <cstddef>
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
 #include <ctime> 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <ccomplex>
 #include <cfenv>
 #include <cinttypes>
 #include <cstdbool>
 #include <cstdint>
 #include <ctgmath>
 #include <cwchar>
 #include <cwctype>
 #endif
 
 // C++
 #include <algorithm>
 #include <bitset>
 #include <complex>
 #include <deque>
 #include <exception>
 #include <fstream>
 #include <functional>
 #include <iomanip>
 #include <ios>
 #include <iosfwd>
 #include <iostream>
 #include <istream>
 #include <iterator>
 #include <limits>
 #include <list>
 #include <locale>
 #include <map>
 #include <memory>
 #include <new>
 #include <numeric>
 #include <ostream>
 #include <queue>
 #include <set>
 #include <sstream>
 #include <stack>
 #include <stdexcept>
 #include <streambuf>
 #include <string>
 #include <typeinfo>
 #include <utility>
 #include <valarray>
 #include <vector> 
 #ifdef __GXX_EXPERIMENTAL_CXX0X__
 #include <array>
 #include <atomic>
 #include <chrono>
 #include <condition_variable>
 #include <forward_list>
 #include <future>
 #include <initializer_list>
 #include <mutex>
 #include <random>
 #include <ratio>
 #include <regex>
 #include <system_error>
 #include <thread>
 #include <tuple>
 #include <typeindex>
 #include <type_traits>
 #include <unordered_map>
 #include <unordered_set>
 #endif
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>
using namespace std;
int F[114]={};
int fib(int n){
    if(n == 0 || n == 1) return 1;
    else if(F[n] != 0) return F[n];
    else {
        return F[n] = fib(n-1) + fib(n-2);
    }
}

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

C++: #include <iostream>

using namespace std;

int main(void){
  int n;
  cin>>n;
  int A[50];
  for(int i=0;i<50;i++){
    A[i]=0;
  }
  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 <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);i++)
#define erep(i,a,b) for(int i=a;i<=(int)(b);i++)
#define per(i,a,b) for(int i=(b)-1;i>(a);i--)
#define eper(i,a,b) for(int i=((int)(a));i>=b;i--)
#define pb push_back
#define mp make_pair
#define INF (1<<30)-1
#define MOD 1000000007
using namespace std;
typedef long long ll;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}

int n, dp[1000];
int main() {
 ios::sync_with_stdio ( false );
 cin.tie ( 0 );
    cin >> n;
    dp[0] = dp[1] = 1;
    erep(i, 2, n) { dp[i] = dp[i - 1] + dp[i - 2]; }
    cout << dp[n] << endl;
    return 0;
}

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

long long F[100000] = {};
long long f(int);

int main(){
	int n;
	cin >> n;
	cout << f(n) << endl;
	//for(int i = 0;i<n;i++) cerr << f(i) << " ";
	//cerr << endl;
	return 0;
}

long long f(int k){
	if(F[k] != 0) return F[k];
	else if (k <= 1) return F[k] = 1;
	else{
		return F[k] = f(k-1) + f(k-2);
	}
}

C++: #include <iostream>
#include <cmath>
#include <iomanip>
#include <limits>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <cctype>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)

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

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define pd(a,n) for(int i=0;i<n;i++)cout<<a[i]<<((i==n-1)?"\n":" ");cout<<endl;
#define pdd(a,n,m)for(int i=0;i<n;i++){for(int j=0;j<m;j++)cout<<a[i][j]<<" ";cout<<endl;}
#define mp make_pair
#define pb push_back
#define ll long long
//#define __int64 lng long
#define P pair<int,int>
#define PP pair<P,int>

int n;
int dp[1111];

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

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

int fibo(int x) {
  int a;
  if ( x == 0 ) return 1;
  if ( x == 1 ) return 1;
  a = fibo(x-1) + fibo(x-2);
  return a;
}

int main() {
  int x, y;

  cin >> x;

  y = fibo(x);

  cout << y << endl;

  return 0;
}

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){
  if(n==0 || n == 1){
    return 1;
  }else{
    return fib(n-1) + fib(n-2);
  }
}