Go: package main

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

var (
	nstr   func() string
	stdout *bufio.Writer
)

func init() {
	nstr = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func main() {
	defer stdout.Flush()
	n := nint()
	r := fibonacci(n)
	fmt.Println(r)
}

func fibonacci(n int) int{
	if n == 0 || n == 1{
		return 1
	}else{
		fiList := make([]int, n+1)
		fiList[0] = 1
		fiList[1] = 1
		for i:=2; i<n+1; i++{
			fiList[i] = fiList[i-1] + fiList[i-2]
		}
		return fiList[n]

	}

}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func nint64() int64 {
	i, err := strconv.ParseInt(nstr(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func nint() int {
	return int(nint64())
}

func getIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = nint()
	}
	return b
}

func getStringSlice(n int) []string {
	b := make([]string, n)
	for i := 0; i < n; i++ {
		b[i] = nstr()
	}
	return b
}

func gcd(x, y int) int {
	if y == 0 {
		return x
	}
	return gcd(y, x%y)
}

func lcm(x, y int) int {
	return x * y / gcd(x, y)
}

func contains(s []int, e int) bool {
	for _, a := range s {
		if a == e {
			return true
		}
	}
	return false
}

func bin(i int, prefix bool) string {
	i64 := int64(i)

	if prefix {
		return "0b" + strconv.FormatInt(i64, 2)
	} else {
		return strconv.FormatInt(i64, 2)
	}
}

func strReverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

C++: #include <cstdio>
#include <vector>

using namespace std;

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

C++: #include<stdio.h>
#define MAX 50
int dp[MAX];

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

int main()
{
	for (int i = 0; i < MAX; i++)
	{
		dp[i] = -1;
	}

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

	printf("%d\n", fibonacci(n));
}

C++: #include <iostream>
using namespace std;
 
int main() {
	void fibonacci_1(const int count , int data[]) {
	data[0] = 1;
	if(count == 1) return;
	data[1] = 1;
 
	for( int i = 2; i < count ; i++) {
		data[i] = data[i-1]+data[i-2];
	}
}
	return 0;

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

int fibonacci(int n);

int F[45];

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

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

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int dp[50];
  dp[0]=dp[1]=1;
  for(int i=2; i<50; i++){
    dp[i] = dp[i-1]+dp[i-2];
  }
  //rep(i,50) cout << dp[i] << " ";
  int n;
  cin >> n;
  cout << dp[n] << endl;
  return 0;
}

C++: #include <cstdio>
#include <vector>

using namespace std;

int main()
{
    int n;
    
    scanf("%d", &n);
    
    vector<long long> dp(n + 1);
    
    dp[1] = dp[0] = 1;
    
    for(int i = 2; i <= n ;i++)
    {
        dp[i] = dp[i - 1] + dp[i - 2];
    }
    
    printf("%lld", dp[n]);
    
    return 0;
}

C++: #include <iostream>
#define MAX 50
using namespace std;
typedef long long ll;

ll dp[MAX];

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

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

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>

using namespace std;

int main()
{
    int fib[45] = {};
    fib[0] = fib[1] = 1;

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

    return 0;
}

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

int main() {
	int n;
	cin >> n;
	int F[50];
	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 <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cstring>
#include <queue>
#include <vector>
#include <functional>
#include <map>
#include <set>
#include <cmath>
#include <string>
#define SIZE 200005
#define INF 1000000005LL

using namespace std;
typedef long long int ll;
typedef pair <int,int> P;

int n;
ll K;

int main()
{
	scanf("%d",&n);
	int dp[50];
	for(int i=0;i<=n;i++){
		if(i==0||i==1){
			dp[i]=1;continue;
		}
		dp[i] = dp[i-1]+dp[i-2];
	}
	printf("%d\n",dp[n]);
	return 0;
}

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

int memo[111]={0};

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

int main(){
  int a;

  scanf(" %d",&a);

  fib(a);

  cout << memo[a] << endl;

  return 0;

}

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

int main() {
    long long fib[50];
    fib[0] = fib[1] = 1;
    for (int i = 2; i < 50; ++i) {
        fib[i] = fib[i - 1] + fib[i - 2];
    }
    int n;
    cin >> n;
    cout << fib[n] << "\n";
    return 0;
}

C++: #include <iostream>
#include <cstring>
#define Max 100
using namespace std;
int dp[Max];
int fib(int n){
    if(n==0 || n==1)
        return 1;
    if(dp[n]>0)
        return dp[n];
    else{
        dp[n]=fib(n-1)+fib(n-2);
        return dp[n];
    }
    
}

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

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <cmath>
#include <iomanip>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <deque>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>



using namespace std;

int main() {
   

    long long n;
    cin >> n;
    long long F[50];
    F[0] = F[1] = 1;
    for (int i=2;i<n;i++){
        F[i] = F[i-1] + F[i-2];
    }
    cout << F[n-1] << endl;


}

C++: #include <iostream>
using namespace	std;
int main(){

  int n,a[45],i;

  cin>>n;
  a[0]=1;
  a[1]=1;

  for(i=2;i<=n;i++) a[i]=a[i-2]+a[i-1];

  cout<<a[n]<<endl;

  return 0;

}

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

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


}

C++: // ALDS1_10_A.cpp
// Dynamic Programming - Fibonacci Number

#include <iostream>
using namespace std;

int fib(int n) {
    if (n == 0 || n == 1)
        return 1;
    int pre = 1;
    int curr = 1;
    int next = 1;
    while (n-- > 1) {
        next = pre + curr;
        pre = curr;
        curr = next;
    }
    return next;
}

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

C++: #include <iostream>

using namespace std;

#define INF -1

int dp[45];

int main()
{
	for(int i = 0; i < 45; i++) { dp[i] = INF; }

	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;
}