Go: package main

/*
フィボナッチ数列
*/

import (
	"bufio"
	"bytes"
	"fmt"
	"log"
	"os"
	"strconv"
	"strings"
)

func fibWithMemo(n int, memo map[int]int) int {
	if n == 0 || n == 1 {
		return 1
	}
	if val, ok := memo[n]; ok {
		return val
	}
	memo[n] = fibWithMemo(n-1, memo) + fibWithMemo(n-2, memo)
	return memo[n]
}

func fib(n int) int {
	memo := make(map[int]int)
	return fibWithMemo(n, memo)
}

func main() {
	scanner := makeScanner(1024)
	n := eGetInt(scanner)
	fmt.Println(fib(n))
}

////////////////////////////////////////////////////////////////////////////////
// ライブラリ
////////////////////////////////////////////////////////////////////////////////
func makeScanner(maxByte int) *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]uint8, 0, 8192), maxByte)
	return scanner
}
func makeWordScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanWords)
	return scanner
}
func eGetLine(r *bufio.Scanner) string {
	if r.Scan() {
		return r.Text()
	}
	err := r.Err()
	if err != nil {
		log.Fatal(err)
	}
	// EOF
	return ""
}
func eGetInt(r *bufio.Scanner) int {
	line := eGetLine(r)
	return eAtoi(line)
}
func eGetFields(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Fields(line)
}
func eGetInts(r *bufio.Scanner) []int {
	fields := eGetFields(r)
	ints := make([]int, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoi(fields[i])
	}
	return ints
}
func eGetChars(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Split(line, "")
}
func eAtoi(s string) int {
	n, err := strconv.Atoi(s)
	if err != nil {
		log.Fatal(err)
	}
	return n
}

type ints []int

func (s ints) String() string {
	var buf bytes.Buffer
	buf.WriteString("[")
	sep := ""
	for _, v := range s {
		buf.WriteString(fmt.Sprintf("%s%d", sep, v))
		sep = ", "
	}
	buf.WriteString("]")
	return buf.String()
}

func reverse(a ints) ints {
	r := make(ints, len(a))
	for i := 0; i < len(a); i++ {
		r[i] = a[len(a)-1-i]
	}
	return r
}
func max(a ints) (int, bool) {
	if len(a) == 0 {
		return 0, false
	}
	m := a[0]
	for _, e := range a {
		if e > m {
			m = e
		}
	}
	return m, true
}
func min(a []int) int {
	m := a[0]
	for _, v := range a {
		if v < m {
			m = v
		}
	}
	return m
}

func sum(a ints) int {
	if len(a) == 0 {
		return 0
	}
	sum := 0
	for _, e := range a {
		sum += e
	}
	return sum
}
func find(n int, a ints) int {
	for i, v := range a {
		if n == v {
			return i
		}
	}
	return -1
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#define rep(i,n) for(int i=0; i<(n); ++i)
#define outl(x) cout<< (x) << '\n'
using namespace std;

int fib[45] = {1, 1};

signed main()
{
   cin.tie(0), ios::sync_with_stdio(false);
   int n;
   cin >> n;
   for(int i=2; i<=n; ++i){
      fib[i] = fib[i-1] + fib[i-2];
   }
   outl( fib[n] );
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int lld;

const lld mod = 1e9+7;
const lld INF = 1e9;
//const lld MAXN = 1e9;

int fib[45];

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

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

	return 0;
}

C++: #include<iostream>


/*
auto fib(int x)->int {

	return
		x <= 1 ? 1 : fib(x - 1) + fib(x - 2);
}*/

using ull = unsigned long long;

int main() {

	int n;
	std::cin >> n;
	
	ull tab[45]{};

	auto ans = [](auto f_, auto x) {
		return 
			f_(f_, x);
	}(
		[&](auto f, auto n) ->ull {
		return
			n <= 1 ? 1 :
			tab[n] == 0 ? tab[n] = f(f, n - 1) + f(f, n - 2) : tab[n];

		} ,	n);
	
//	std::cout << fib(3) << "\n";
	std::cout << ans << "\n";

//	std::cin >> ans;

	return 0;
}

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

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

	int n, N[50];
	N[0] = N[1] = 1;
	cin >> n;

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

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

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

const int MAX = 44;
int F[MAX];

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


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

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

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

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

typedef std::vector<int> Memo;

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

int main() {
    int n = 0;
    Memo memo = Memo(50, -1);
    
    std::scanf("%d", &n);
    std::printf("%d\n", fib(n, memo));
}

C++: #include <bits/stdc++.h>
#define rep(i, to) for (int i = 0; i < (to); i++)
#define rrep(i, to) for (int i = (to) - 1; i >= 0; i--)
#define repf(i, from, to) for (int i = (from); i < (to); i++)
#define all(v) v.begin(), v.end()
#define unless(cond) if (!(cond))
using namespace std;
using ll = long long;
template <typename T>
using V = vector<T>;
template <typename T, typename U>
using P = pair<T, U>;

int main() {
  int n;
  V<int> fibo;

  cin >> n;
  fibo.resize(n + 1);

  fibo[0] = fibo[1] = 1;

  repf(i, 2, n + 1) {
    fibo[i] = fibo[i - 1] + fibo[i - 2];
  }

  cout << fibo[n] << endl;
}

C++: #coding: UTF-8

s = input()
h = s/3600
s = s%3600
m = s/60
s = s%60

print str(h) + ":" + str(m) + ":" + str(s)

C++: #include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

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

	long long int f[45];
	int n; cin >> n;

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

	cout << f[n] << "\n";

	return 0;
}

C++: #include<stdio.h>

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

}

C++: #include<iostream>
#include<cstdio>
using namespace std;
typedef long long int ll;
ll Dp[50];
int main()
{
Dp[0]=1;
Dp[1]=1;
for(int i=2;i<50;i++)Dp[i]=Dp[i-1]+Dp[i-2];
int N;
cin >> N;
cout << Dp[N] << "\n";
 
return 0;
}

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

vector<int> dp;

int f(int n) {
    if (dp[n]) return dp[n];
    if (n <= 1) return dp[n] = 1;
    return dp[n] = f(n - 1) + f(n - 2);
}

int main() {
    int n;
    cin >> n;
    dp.resize(n + 1);
    cout << f(n) << endl;
}

C++: #include <iostream>

using namespace std;
long dp[10000]={0};


long fibo(int a){
  if (a==0 or a==1) return 1L;

  if(dp[a] !=0) return dp[a];
  dp[a] = fibo(a-1)+fibo(a-2);

  return dp[a];

}

int main(){
  long n,req;

  cin >> req;
  n = fibo(req);

  cout <<n<<endl;



  
  return 0;
}

C++: #include <algorithm>
#include <iostream>
#include <queue>
#include <cmath>
#include <string>
#include <iterator>
#include <map>
#include <set>
#include <iomanip>
#include <vector>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
#define INF 100000000
#define MAX 200001
#define MOD 1000000007
ll fac[MAX], finv[MAX], inv[MAX];
const int MX = 1000005;

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

C++: #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")

#define rep(i,n) for(int i = 0;i<n;i++)
const long long MOD = 1000000007;

int main(){
  int n; cin >> n;
  long long 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] << "\n";
}