Go: package main

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

const (
	initialBufSize = 100000
	maxBufSize     = 1000000
)

var sc *bufio.Scanner

func initScanner(r io.Reader) *bufio.Scanner {
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines
	return sc
}

func main() {
	sc = initScanner(os.Stdin)
	fmt.Println(resolve(parseProblem()))
}

func parseProblem() int {
	return scanInt(sc)
}

func resolve(n int) int {
	dp := make([]int, n+1)
	dp[0], dp[1] = 1, 1
	for i := 2; i <= n; i++ {
		dp[i] = dp[i-1] + dp[i-2]
	}
	return dp[n]
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}

C++: #include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include<cstdio>
#include <vector>
#include<queue>
#include<limits.h>
#include<string.h>
#include<functional>
#include<map>
#include<set>
#include<list>
#include<unordered_map>
#include<queue>
#define int long long
using namespace std;

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

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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("Yes")
#define p_no() p("No")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

template < typename T >
void vprint(T &V){
	for(auto v : V){
    	cout << v << " ";
	}
	cout << endl;
}

ll fib[100];

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

    // input
    ll N;
    cin >> N;

    fib[0] = 1;
    fib[1] = 1;
    FOR(i, 2, 50){
        fib[i] = fib[i-1] + fib[i-2];
    }

    p(fib[N]);
    
    return 0;
}

C++: using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define divup(a,b) ( ( (a) + ( (b) - 1u) ) / (b) ) // a/b の余り切り上げ
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
const ll mod = 1000000007;
const ll mod9 = 1000000009;


ll fib[50];
signed main(){
    ll n;
    scanf("%lld",&n);
    rep(i,n+1){
        if(i==0 || i==1) fib[i]=1;
        else fib[i]=fib[i-1]+fib[i-2];
    }
    printf("%lld\n",fib[n]);
}

C++: #include<stdio.h>
#include(sys/time.h>
static double gettime(){
	struct timeval tv ={0};
	gettimeofday(&tv,NULL);
	return(tv,tv-sec*1000.0)+(tv.tv_usec/1000.0);
}

long long fibo(int n){
	if(n==0||n==1)retrn 0;
	return fibo(n-1)+fibo(n-2);
}
 int main(void){
	printf("fibo(40)=%lld\n",fibo(40));

return(0);
}

C++: #include<iostream>

using namespace std;

int main() {
	int n,now;
	int before1=1, before2=1;
	cin >> n;
	if (n <= 1) {
		cout << 1<<endl;
		return 0;
	}
	for (int i = 2;i <= n;) {
		now = before1 + before2;
		before2 = before1;
		before1 = now;
		i++;
	}
	cout << now<<endl;
}

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

int memo[100];

int fib(int n){
	if(memo[n])return memo[n];

	memo[n]=fib(n-1)+fib(n-2);
	return memo[n];
}

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

	memo[0]=memo[1]=1;
	cout<<fib(n)<<endl;

	return 0;
}

C++: #define scanf_s scanf
#include <iostream>
using namespace std;
int fib(int n) 
{
	if (n >= 0) {
		if (n <= 1) return 1;
		return fib(n - 1) + fib(n - 2);
	}
}
int main(void)
{
	int n;
	scanf_s("%d", &n);
	printf("%d\n", fib(n));
}

C++: #include <bits/stdc++.h>
using namespace std;
vector<int> dp(50, 0);

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

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

C++: #include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <complex>
#include <ios>
#include <iomanip>
using namespace std;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define print(x) cout<<(x)<<'\n'
#define print_vec(v) rep(i,v.size()){if(i!=0)cout<<" ";cout<<v[i];}cout<<'\n'
#define pe(x) cout<<(x)<<" "
#define DEBUG(x) cout<<#x<<": "<<x<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";rep(i,v.size())cout<<" "<<v[i];cout<<'\n'
#define pb push_back
#define mp make_pair
#define MOD 1000000007 //10^9+7
#define fi first
#define sc second
using ll=long long;
using pi=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vll=vector<ll>;
using vstr=vector<string>;

void solve() {
    int n,fib[50]; 
    cin >> n;
    fib[0] = 1;
    fib[1] = 1;
    rng(i,2,n+1){
        fib[i] = fib[i-1]+fib[i-2];
    }
    print(fib[n]);
}
 
int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
	cout<<fixed<<setprecision(20);
    //int q; cin >> q;
	//while (q--)
		solve();
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
#include <iomanip>
#include <map>
#include <bitset>
#include <cstdio>
#include <set>
#include <stack>
#include <queue>
#include <cassert>
#include <numeric>
//#include <bits/stdc++.h>
#define rep(i,n) Rep(i,0,n)
#define Rep(i,k,n) for(int i=k ; i<n ; i++)
#define rep1(i,n) for(int i=1 ; i<=n ; i++)
#define Rep1(i,k,n) for(int i=k ; i<=n ; i++)
#define vi vector<int>
#define vii vector<vector<int>>
#define mii map<int,int>
#define Sort(v) sort(v.begin(),v.end())
#define Reverse(v) reverse(v.begin(),v.end())
#define ALL(a)  (a).begin(),(a).end()
#define pb push_back
//#define int ll
typedef long long ll;

const int md = 1000000007;
const int INF = 1<<30;
using namespace std;

int main(){
    int n; cin >> n;
    vi dp(n+10,0);


    dp[0] = 1;
    dp[1] = 1;
    rep(i,n){
        dp[i+2] = dp[i+1]+ dp[i];
    }

    cout << dp[n] << endl;

}

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