Go: package main

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

//util
var sc = bufio.NewScanner(os.Stdin)

func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func printList(list []int) {
	buf := bufio.NewWriter(os.Stdout)
	for _, v := range list {
		buf.Write([]byte(fmt.Sprintf(" %d", v)))
	}
	buf.Write([]byte("\n"))
	buf.Flush()
}

//solve
//単純な場合
func fibonacci_(n int) int {
	if n == 0 || n == 1 {
		return 1
	}
	return fibonacci_(n-2) + fibonacci_(n-1)
}

//メモ再帰の利用
func fibonacci(n int) int {
	if n == 0 || n == 1 {
		F[n] = 1
	}
	//F[n]が計算済みの場合
	if F[n] > 0 {
		return F[n]
	}
	F[n] = fibonacci(n-2) + fibonacci(n-1)
	return F[n]
}

const MAX = 50

var F [MAX]int

func main() {
	sc.Split(bufio.ScanWords)
	n := nextInt()
	fmt.Println(fibonacci(n))

}

C++: #include <bits/stdc++.h>
using namespace std;
int F[114]={};
int fib(int n){
    if(n == 0 || n == 1) return F[n] = 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 <bits/stdc++.h>
using namespace std;
#define rep(i, a) for(int i=0; i<(a); i++)
typedef long long ll;

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

using namespace std;


int F[45];

int main() {
  F[0] = 1;
  F[1] = 1;
  for (int i = 2; i < 45; ++i) {
    F[i] = F[i-1] + F[i-2];
  }

  int input;
  cin >> input;
  cout << F[input]<< endl;
}

C++: #include<stdio.h>
#define N 100

int F[N];

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

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

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

int main()
{

	int n;
	cin >> n;

	vector<int64_t> fib(n+1);
	fib[0]=1;
	fib[1]=1;

	for (int i=2;i<=n;++i)
	{
		fib[i]=fib[i-1]+fib[i-2];
	}
	cout << fib[n] << endl;
}

C++: #include<iostream>
using namespace std;
int fib(int n)
{
    int F[50];
    if(n<=1) return 1;
    for(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 n, A[44];

void fibo(){
    A[0] = 1;
    A[1] = 1;
    for (int i = 2; i <= n; i++) A[i] = A[i -1] + A[i -2];
}

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

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

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

    return 0;
}

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

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;


int n;
vector<int> dp;
int main() {
    cin >> n;
    dp.assign(n+1,-1);
    dp[0] = 1;
    dp[1] = 1;
    FOR(i,2,n+1){//i=nまで計算！
        dp[i] = dp[i-1] + dp[i-2];
    }

    cout << dp[n] << endl;
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define len(n) (int)n.length()
#define pb push_back
#define ll long long
#define make_pair mkp
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define ALL(v) (v).begin(), (v).end()
#ifdef DBGPRT
#define dbg(n) cerr << "//" << #n << ":" << n <<endl
#else
#define dbg(n) ;
#endif
typedef pair<ll, ll> LLARR;
#define INF 999999999
const double PI = 3.1415926535897932384626433832795;


vector<ll> memo(50,0);
ll fibo(int n)
{
	if ((n==0) || (n==1))
		return memo[n] = 1;
	
	if (memo[n] != 0)
		return memo[n];
	
	memo[n-1] = fibo(n-1);
	memo[n-2] = fibo(n-2);
	return fibo(n-1) + fibo(n-2);
}

int main()
{
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	
	cout << fibo(n) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int dp[100];

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

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

typedef long long ll;


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

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

int main() {

	int n;
  	vector<int> v(1, 0);
  	v.push_back(1);
  
	cin >> n;
  
	for (int i = 2;i<n+2;i++){
      	v.push_back(v[i-1]+v[i-2]);
      	//cout<< v[i] <<endl;
    }
  
  	cout<< v[n+1] <<endl;

}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#define debug(x) cout << #x << "==" << x << endl;

using namespace std;

//??\???
#define MAX_N 44
int N;
int dp[MAX_N];

int main() {
  ios::sync_with_stdio(false);

  cin >> N;

  dp[0] = 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<queue>
#include<string>
#include<utility>
#include<iostream>
using namespace std;

int main(){
    int n,q;
    pair<string,int> task;
    int lapse;
    cin>>n>>q;
    queue<pair<string,int>> Q;
    for(int i=0;i<n;++i){
        cin>>task.first>>task.second;
        Q.push(task);
    }
    while(! Q.empty()){
        int process=(Q.front().second>q?Q.front().second-q:0);
        lapse+=(Q.front().second>q?q:Q.front().second);
        string name=Q.front().first;
        task.first=name;
        task.second=process;
        Q.pop();
        if(task.second>0){
            Q.push(task);
        }
        else{
            cout<<task.first<<" "<<lapse<<"\n";
        }
    }
}

C++: #include <iostream>

using namespace std;


int F[44];

int main() {
  F[0] = 0;
  F[1] = 1;
  for (int i = 2; i < 44; ++i) {
    F[i] = F[i-1] + F[i-2];
  }

  int input;
  cin >> input;
  cout << F[input]<< endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

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

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

int main()
{
    int N;
    cin >> N;
    long long dp[N + 1];
    dp[0] = 1;
    dp[1] = 1;
    for (int i = 0; i < N - 1; i++) {
        dp[i + 2] = dp[i + 1] + dp[i];
    }
    printf("%lld\n", dp[N]);
}

C++: #include <iostream>

using namespace std;

int f(int n){
	static int dp[3000];
	for(int i=0;i<=n;i++){
	if(i==0|| i==1) dp[i] = 1;
	else dp[i] = dp[i-1] + dp[i-2];
	}
	return dp[n];
}
int main(){
	int n;
	cin>>n;
	cout<<f(n)<<endl;
}