jiahuimbzuai/CoQuIR huggingface dataset:
//  [typescript]
import * as fs from 'fs';

export function Main(input: string) {
    let [h1, s1, h2, s2] = input.split(' ').map(int => parseInt(int));    // ?

    let result = '';
    while (true) {
        // Takahashi
        h2 -= s1;
        if (h2 <= 0) {
            result = 'Yes';
            break;
        }
        h1 -= s2;
        if (h1 <= 0) {
            result = 'No';
            break;
        }
    }

    //output

    console.log(result);
    return result;
}

// Don't edit this line!
Main(fs.readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').split(' ') // ['1', '2' , ...]
const output = (x: any) => console.log(x)
// debug(input)

const [A, B, C, D] = input.map(n => parseInt(n, 10))

const t = Math.floor((A + D - 1) / D)
const a = Math.floor((C + B - 1) / B)

t >= a ? output('Yes') : output('No')
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').split(' ') // ['1', '2' , ...]
const output = (x: any) => console.log(x)
// debug(input)

const [A, B, C, D] = input.map(n => parseInt(n, 10))

const t = (A + D - 1) / D
const a = (C + B - 1) / B

t >= a ? output('Yes') : output('No')
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').split(' ') // ['1', '2' , ...]
const output = (x: any) => console.log(x)
// debug(input)

let [A, B, C, D] = input.map(n => parseInt(n, 10))
while(A > 0 && C > 0) {
    A -= D
    C -= B
}
C == 0 ? output('Yes') : output('No')
//  [typescript]
import * as fs from 'fs'
import {debug} from '../../../util'

const input = fs.readFileSync('/dev/stdin', 'utf8').split(' ') // ['1', '2' , ...]
const output = (x: any) => console.log(x)
// debug(input)

let [A, B, C, D] = input.map(n => parseInt(n, 10))
while(A > 0 || C > 0) {
    A -= D
    C -= B
}
C == 0 ? output('Yes') : output('No')
//  [python]
a,b = map(int, input().split())
# n >= (b-1)/(a-1)を満たす最小のnを求める。
ans = 0
if (b-1)%(a-1) == 0:
    ans = (b-1)/(a-1)
elif (b-1)%(a-1) != 0:
    ans = (b-1)//(a-1) + 1
print(int(ans))
//  [python]
A, B = [int(i) for i in input().split()]
#print('A=',A)
#print('B=',B)

num_power_strip = 0
num = 1

while num < B:
    num_power_strip += 1
    num += A - 1
#    print(num_power_strip)
#    print(num)

print(num_power_strip)
//  [python]
a, b = map(int, input().split())
unused = 1
ans = 0
while unused < b:
  unused += (a-1)
  ans += 1
print(ans)
//  [python]
N,K = map(int,input().split())
c = N
ans = 1
while c < K:
    ans += 1
    c += N-1
print(ans)
//  [python]
a,b=list(map(int,input().split()))
print((b-1)//(a-1))
//  [python]
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7
import math
a, b = LI()

# a は電源タップの口数
# b　は欲しい口数>
# 何個電源タップが必要ですか？
# ただしもとから一つの差し込み口がある。

if b == 1:
    print(0)
else:
    x = math.ceil(b / a)
    print(x)
//  [java]
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

public class Main {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve() {
			int a = ni(), b = ni();
			int	ct = 1;
			int	step = 0;
				while (ct < b) {
				    ct -= 1;
				    ct += a;
				    step += 1;
				}
				out.print(step);
	}
		
		
	void run() throws Exception {
		is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		if (!INPUT.isEmpty())
			tr(System.currentTimeMillis() - s + "ms");
	}

	public static void main(String[] args) throws Exception {
		new Main().run();
	}

	private byte[] inbuf = new byte[1024];
	public int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = is.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {
		return !(c >= 33 && c <= 126);
	}

	private int skip() {
		int b;
		while ((b = readByte()) != -1 && isSpaceChar(b))
			;
		return b;
	}

	private double nd() {
		return Double.parseDouble(ns());
	}

	private float nf() {
		return Float.parseFloat(ns());
	}

	private char nc() {
		return (char) skip();
	}

	private String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	private char[] ns(int n) {
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while (p < n && !(isSpaceChar(b))) {
			buf[p++] = (char) b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}

	private char[][] nm(int n, int m) {
		char[][] map = new char[n][];
		for (int i = 0; i < n; i++)
			map[i] = ns(m);
		return map;
	}

	private int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}

	private int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private long nl() {
		long num = 0;
		int b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private static void tr(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        FS reader = new FS();
        // write reader
        int A = reader.nextInt();
        int B = reader.nextInt();

        int ans = 0;
        int tmp = 1;
        while (tmp < B) {
            tmp += A-1;
            ans++;
        }
        System.out.println(ans);
    }
    
    public static void solver() {
        // write logic
    }
    
    // Read Class
    static class FS {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            } else {
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }
    
        private int readByte() { return hasNextByte() ? buffer[ptr++] : -1;}
        private boolean isPrintableChar(int c) {return 33 <= c && c <= 126;}
        private void skipUnprintable() {while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
    
        public boolean hasNext() { skipUnprintable(); return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public int nextInt() {
            return (int)nextLong();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while(true) {
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                } else if(b == -1 || !isPrintableChar(b)) {
                    return minus ? -n : n;
                } else {
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
    }
}
//  [java]
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        if(b == 1) System.out.println(0);
        else if(b <= a) System.out.println(1);
        else{
            b -= a;
            System.out.println(1 + b / (a - 1) + b % (a - 1));
        }
    }

    public static void main(String[] args){
        new Main().solve();
    }
}
//  [java]
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        b -= a;
        System.out.println(1 + b / (a - 1) + b % (a - 1));
    }

    public static void main(String[] args){
        new Main().solve();
    }
}
//  [java]
import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    int ans = 1;
    while(a < b){
      a += a-1;
      ans++;
    }
    if(b == 1) ans = 0;
    System.out.println(ans);
  }
}
//  [cpp]
/*******************************
Author:Morning_Glory
LANG:C++
Created Time:2019年09月01日 星期日 19时59分51秒
*******************************/
#include <cstdio>
#include <fstream>
using namespace std;
//{{{cin
struct IO{
	template<typename T>
	IO & operator>>(T&res){
		res=0;
		bool flag=false;
		char ch;
		while((ch=getchar())>'9'||ch<'0')	 flag|=ch=='-';
		while(ch>='0'&&ch<='9') res=(res<<1)+(res<<3)+(ch^'0'),ch=getchar();
		if (flag)	 res=~res+1;
		return *this;
	}
}cin;
//}}}
int n,m,ans;
int main()
{
	cin>>n>>m;
	int t=1;
	while (t<m)	++ans,t+=n-1;
	printf("%d\n",ans);
	return 0;
}
//  [cpp]
#include <stdio.h>
int main(void){
    int a, b;
    int slot;
    int count = 1;
    scanf("%d %d", &a, &b);
    slot = a;

    while(slot < b){
        slot += a;
        slot--;
        count++;
    }
    if(b <= 1){
        count = 0;
    }

    printf("%d\n", count);

    return 0;
}
//  [cpp]
/*
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
*/

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define watch(x) cout<<"->"<<#x<<" : "<<x<<endl;
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c)) 
#define all(v) (v).begin(),(v).end()
typedef long long ll;
typedef unsigned long long llu;

const int INF = 1e9;
const int MOD = 1e9+7;
const double PI = 2*acos(0.0);

signed main()
{
	//freopen("","r",stdin);
	//freopen("","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	int a,b;
	cin>>a>>b;
	int res = 0;
	int cnt = 1;
	while(cnt<b)
	{
		--cnt;
		cnt+=a;
		++res;
	}
	cout<<res<<endl;
	return 0;
}
//  [cpp]
/*
    -ensure correct output format
    -ensure printing required output
    -reread the problem statement
  */

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll>pll;
typedef pair<ll,pair<ll,ll>>plll;
#define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
#define vll(v) v.begin(),v.end()
#define all(x) x.rbegin(),x.rend()
#define min3(a, b, c)   min(a, min(b, c))
#define max3(a, b, c)   max(a, max(b, c))
#define F first
#define S second
#define in  freopen("input.txt", "r", stdin)
#define out  freopen("output.txt", "w", stdout)
#define minheap int,vector<int>,greater<int>
#define pb push_back
#define eb emplace_back
#define ischar(x)  (('a' <= x && x <= 'z') || ('A' <= x && x <= 'Z'))
#define isvowel(ch) ((ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')||(ch=='A'|| ch=='E' || ch=='I'|| ch=='O'|| ch=='U'))
#define bug cout<<"BUG"<<endl;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const double PI  =3.141592653589793238463;
bool compare(const pair<ll,ll> &a, const pair<ll,ll> &b)
{
       return (a.first > b.first);
}
ll lcm(ll a,ll b)
{
    if(a==0 || b==0)return 0;

    return a/__gcd(a,b)*b;
}

void input(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)cin>>ara[i];
}
void print(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)
        cout<<ara[i]<<" ";
    cout<<endl;
}


int main()
{

   fastread();

   ll i,j,n,m,p,a,sum=0,k,t,b,c,d,cnt=0,q,l,r,ans=0;

      bool flag=false;

      string str,ptr;


   cin>>a>>b;

   if(b==1)
   {
       cout<<1<<endl;

       return 0;
   }

   sum=a;

   cnt=1;

   while(sum<b)
   {
       sum+=(a-1);

       cnt++;
   }

   cout<<cnt<<endl;


}
//  [cpp]
/*
    -ensure correct output format
    -ensure printing required output
    -reread the problem statement
  */

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll>pll;
typedef pair<ll,pair<ll,ll>>plll;
#define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
#define vll(v) v.begin(),v.end()
#define all(x) x.rbegin(),x.rend()
#define min3(a, b, c)   min(a, min(b, c))
#define max3(a, b, c)   max(a, max(b, c))
#define F first
#define S second
#define in  freopen("input.txt", "r", stdin)
#define out  freopen("output.txt", "w", stdout)
#define minheap int,vector<int>,greater<int>
#define pb push_back
#define eb emplace_back
#define ischar(x)  (('a' <= x && x <= 'z') || ('A' <= x && x <= 'Z'))
#define isvowel(ch) ((ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')||(ch=='A'|| ch=='E' || ch=='I'|| ch=='O'|| ch=='U'))
#define bug cout<<"BUG"<<endl;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const double PI  =3.141592653589793238463;
bool compare(const pair<ll,ll> &a, const pair<ll,ll> &b)
{
       return (a.first > b.first);
}
ll lcm(ll a,ll b)
{
    if(a==0 || b==0)return 0;

    return a/__gcd(a,b)*b;
}

void input(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)cin>>ara[i];
}
void print(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)
        cout<<ara[i]<<" ";
    cout<<endl;
}


int main()
{

   fastread();

   ll i,j,n,m,p,a,sum=0,k,t,b,c,d,cnt=0,q,l,r,ans=0;

      bool flag=false;

      string str,ptr;


   cin>>a>>b;

   if(b==1)
   {
       cout<<1<<endl;

       return 0;
   }

   a--;
   b--;

    n=b/a;

    if(b%a)n++;

    cout<<n<<endl;


}
//  [cpp]
/*
    -ensure correct output format
    -ensure printing required output
    -reread the problem statement
  */

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll>pll;
typedef pair<ll,pair<ll,ll>>plll;
#define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL));
#define vll(v) v.begin(),v.end()
#define all(x) x.rbegin(),x.rend()
#define min3(a, b, c)   min(a, min(b, c))
#define max3(a, b, c)   max(a, max(b, c))
#define F first
#define S second
#define in  freopen("input.txt", "r", stdin)
#define out  freopen("output.txt", "w", stdout)
#define minheap int,vector<int>,greater<int>
#define pb push_back
#define eb emplace_back
#define ischar(x)  (('a' <= x && x <= 'z') || ('A' <= x && x <= 'Z'))
#define isvowel(ch) ((ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')||(ch=='A'|| ch=='E' || ch=='I'|| ch=='O'|| ch=='U'))
#define bug cout<<"BUG"<<endl;
const int Max = 2e6 + 10;
const int Mod = 1e9 + 7;
const double PI  =3.141592653589793238463;
bool compare(const pair<ll,ll> &a, const pair<ll,ll> &b)
{
       return (a.first > b.first);
}
ll lcm(ll a,ll b)
{
    if(a==0 || b==0)return 0;

    return a/__gcd(a,b)*b;
}

void input(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)cin>>ara[i];
}
void print(ll ara[],ll n)
{
    for(ll i=0; i<n; i++)
        cout<<ara[i]<<" ";
    cout<<endl;
}


int main()
{

   fastread();

   ll i,j,n,m,p,a,sum=0,k,t,b,c,d,cnt=0,q,l,r,ans=0;

      bool flag=false;

      string str,ptr;


   cin>>a>>b;

    n=b/a;

    if(b%a)n++;

    cout<<n<<endl;


}
//  [c]
#include<stdio.h>
int main()
{
    int a,b,n,count=0;
    scanf("%d%d",&a,&b);
    if(b<2)
       printf("%d",count);
    else
    {
    n=a;
    while(n<b)
    {
        n+=a-1;
        count++;
    }
    printf("%d",++count);
    }

}
//  [c]
#include<stdio.h>
int main(){
  int A,B,now=1,i=0;
  scanf("%d%d",&A,&B);
  
  while(now<B){
    now=now-1+A;
    i++;
   }
  printf("%d",i);
  return 0;
 }
//  [c]
#include<stdio.h>
int main()
{
    int a,b,j,k,s=0,t=0,i;
    scanf("%d%d",&a,&b);
        printf("%d\n",(a+b-3)/(a-1));

    return 0;
}
//  [c]
#include  <stdio.h>

int main(void)
{
   int a,b;
    scanf("%d %d",&a,&b);
    
    if(a==1)
    {
        printf("0");
        return 0;
    }
        
    
    if( b%a != 0)
    {
        printf("%d",b/a+1);
    }
    
    else printf("%d",b/a);
    return 0;
}
//  [c]
#include  <stdio.h>

int main(void)
{
   int a,b;
    scanf("%d %d",&a,&b);
    
    if( b%a != 0)
    {
        printf("%d",b/a+1);
    }
    
    else printf("%d",b/a);
    return 0;
}
//  [c]
#include <stdio.h>
#include <math.h>

int main(void){

  double A, B;
  int c;
  
  scanf("%f %f",&A,&B);
  c = ceil(double(B-1)/double(A-1));
  printf("%d",c);
  
  return 0;
}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
//	var input = input.split("\n");
	//文字列から10進数に変換するときはparseIntを使います
    var input2 = input.split(" ");
  	
  	var a = Number(input2[0])
   	var b = Number(input2[1])
  	
  	var num = Math.floor((b -1) / (a-1))
    num = num * (a -1) + 1 >= b ? num : num +1 
  	
  console.log(num)
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input = input.replace(/\n/g, ' ');
  input = input.split(" ");
  var A = input[0];
  var B = input[1];
  var i=0;
  while(true){
    if(B<=(A*i-(i-1))){
      break;
    }
    i++;
  }
  console.log(i);

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict';
const main = val => {
  const a = parseInt(val[0].split(' ')[0], 10);
  const b = parseInt(val[0].split(' ')[1], 10);
  let ans = Math.ceil((b-1)/(a-1));
  console.log(ans);
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));
//  [javascript]
function main() {

    var valor = readline();
    var array = valor.split([' ']);
    for (var i = 0; i < array.length; i++) {
        array[i] = parseInt(array[i]);
    }
    var audioOutputs = array[0];
    var friends = array[1];
    var flag = false;
    var aux = 1;
    var adapters;
    for (var j = 0; flag === false; j++) {
        adapters = audioOutputs * aux - j;
        if (adapters >= friends) {
            flag = true;
        } else {
            aux = aux + 1;
        }
    }

    println(j);
}
//  [javascript]
'use strict';

process.stdin.resume();
process.stdin.setEncoding('utf-8');

let inputString = '';
let currentLine = 0;

process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});

process.stdin.on('end', _ => {
    inputString = inputString.trim().split('\n').map(string => {
        return string.trim();
    });

    main();
});

function readline() {
    return inputString[currentLine++];
}

function print(s) {
    process.stdout.write(s);
}

function println(s) {
    console.log(s);
}


function main() {

    var valor = readline();
    var array = valor.split([' ']);
    for (var i = 0; i < array.length; i++) {
        array[i] = parseInt(array[i]);
    }
    var audioOutputs = array[0];
    var friends = array[1];
    var flag = false;
    var aux = 1;
    var adapters;
    for (var j = 0; flag === false; j++) {
        adapters = audioOutputs * aux - j;
        if (adapters >= friends) {
            flag = true;
        } else {
            aux = aux + 1;
        }
    }

    println(j);
}
//  [javascript]
function recibir() {
        var valor = document.getElementById("texto").value;
        document.getElementById("txt").innerHTML = valor;
        array = valor.split([' ']);
        for (var i = 0; i < array.length; i++) {
            array[i] = parseInt(array[i]);
        }
        var audioOutputs = array[0];
        var friends = array[1];
        var flag = false;
        var aux = 1;
        for (var j = 0; flag === false; j++) {
            adapters = audioOutputs * aux - j;
            if (adapters >= friends) {
                flag = true;
            } else {
                aux = aux + 1;
            }
        }
        console.log(j);
    }
//  [go]
package main

import "fmt"

func main() {
	var A, B int
	fmt.Scan(&A, &B)
	fmt.Println(((B - 1) + (A - 1 - 1)) / (A - 1))
}
//  [go]
package main

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

//Util
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 maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(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)
}

func pow(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	if x == 2 {
		return true
	}
	if x%2 == 0 {
		return false
	}

	b := true
	rootx := int(math.Sqrt(float64(x)))
	i := 3
	for i <= rootx {
		if x%i == 0 {
			b = false
			break
		}
		i += 2
	}
	return b
}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

var A, B int

func main() {
	sc.Split(bufio.ScanWords)
	A, B = nextInt(), nextInt()

	A--
	sock := 1
	ans := 0
	for sock < B {
		sock += A
		ans++
	}

	fmt.Println(ans)
}
//  [go]
package main

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

const mod = 1000000007

// 1MB
const ioBufferSize = 1 * 1024 * 1024
var sc = func() *bufio.Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Buffer(make([]byte, ioBufferSize), ioBufferSize)
	sc.Split(bufio.ScanWords)
	return sc
}()

func next() 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 main() {
	a, b := nextInt(), nextInt()
	count := 0

	for plug := 1; plug < b; plug += a-1 {
		count++
	}

	fmt.Println(count)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
  var a, b, cu, add int
  fmt.Scan(&a)
  fmt.Scan(&b)
  cu = 0
  for true{
    if cu < b{
      cu = a * 2 - 1
      add += 1
    }	else if cu >= b{
      break
    }
  }
  fmt.Println(add)
}
//  [go]
package main

import "fmt"

func main() {
	var A, B int
	fmt.Scanf("%d %d", &A, &B)

	tap := 1 //必要なタップ数．

	for A < B {
		tap++
		B -= A - 1
	}
	fmt.Println(tap)

}
//  [go]
package main

import "fmt"

func main() {
	var A, B int
	fmt.Scanf("%d %d", &A, &B)

	tap := 1 //必要なタップ数．
	if A >= B {
		fmt.Println(1)
	} else {
		for {
			if A < B {
				tap++
				B -= A - 1
			} else {
				break
			}
		}

		fmt.Println(tap)
	}

}
//  [ruby]
a, b = gets.split.map(&:to_i)
available = 1
ans = 0
until available >= b
  available += a - 1
  ans += 1
end
puts ans
//  [ruby]
a,b = gets.chomp.split(" ").map(&:to_i)
p ((b-1.0)/(a-1.0)).ceil
//  [ruby]
a, b = gets.split.map(&:to_i)
cnt = 1
cnt = 0 if b == 1
pow = a
while pow < b
  cnt += 1
  pow += a-1
end
puts cnt
//  [ruby]
a, b = gets.chomp.split.map(&:to_i)

if b == 1 then
    puts 0
else
    ans = 1
    ans += 1 while a*ans < b
    puts ans
end
//  [ruby]
a, b = gets().chomp.split("\s").map{|x| x.to_i}

cnt = 1
sum = a
while(sum < b)
  cnt += 1
  sum += (a - 1)
end

puts cnt
//  [ruby]
a, b = gets.chomp.split.map(&:to_i)
if b == 1 then
    puts 0
else
    ans = 1
    while ans*a < b do
        ans += 1
    end
    puts ans
end
//  [rust]
#[allow(dead_code)]
fn main() {
    let mut aa=i::i();
    let mut bb=i::i();
    let mut sou=0;
    let mut kai:f64=((bb-1)as f64)/((aa-1)as f64);
    println!("{}",kai.ceil());
}

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::num::*;
#[allow(unused_imports)]
use std::str::*;

#[allow(dead_code)]
mod i {
    use super::*;

    pub fn read<T: FromStr>() -> T {
        stdin()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>()
            .parse::<T>()
            .ok()
            .unwrap()
    }

    pub fn str() -> String {
        read()
    }

    pub fn s() -> Vec<char> {
        str().chars().collect()
    }

    pub fn i() -> i64 {
        read()
    }

    pub fn u() -> usize {
        read()
    }

    pub fn u2() -> (usize, usize) {
        (read(), read())
    }

    pub fn u3() -> (usize, usize, usize) {
        (read(), read(), read())
    }

    pub fn f() -> f64 {
        read()
    }

    pub fn c() -> char {
        read::<String>().pop().unwrap()
    }

    pub fn iv(n: usize) -> Vec<i64> {
        (0..n).map(|_| i()).collect()
    }
    pub fn strv(n: usize) -> Vec<String> {
        (0..n).map(|_| str()).collect()
    }

    pub fn iv2(n: usize) -> Vec<(i64, i64)> {
        (0..n).map(|_| iv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv(n: usize) -> Vec<usize> {
        (0..n).map(|_| u()).collect()
    }

    pub fn uv2(n: usize) -> Vec<(usize, usize)> {
        (0..n).map(|_| uv(2)).map(|a| (a[0], a[1])).collect()
    }

    pub fn uv3(n: usize) -> Vec<(usize, usize, usize)> {
        (0..n).map(|_| uv(3)).map(|a| (a[0], a[1], a[2])).collect()
    }

    pub fn fv(n: usize) -> Vec<f64> {
        (0..n).map(|_| f()).collect()
    }

    pub fn cmap(h: usize) -> Vec<Vec<char>> {
        (0..h).map(|_| s()).collect()
    }
}
//  [rust]
use std::io::*;
use std::str::FromStr;

#[allow(dead_code)]
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let a = read::<usize>();
    let b = read::<usize>();
    println!("{}", (b - 1 + a - 2) / (a - 1));
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn adjacent4(x: usize, y: usize, sx: usize, sy: usize) -> Vec<(usize, usize)> {
    [(-1, 0), (1, 0), (0, -1), (0, 1)]
        .into_iter()
        .filter_map(|&(dx, dy)| {
            let nx = x as isize + dx;
            let ny = y as isize + dy;
            if nx >= 0 && nx < sx as isize && ny >= 0 && ny < sy as isize {
                Some((nx as usize, ny as usize))
            } else {
                None
            }
        })
        .collect()
}

#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
fn main() {
    input! {
        a: usize,
        b: usize,
    }
    // 初期値1でa-１個ずつ増える。つまりa-1個ずつ増やしてb-1口増やしたい
    let ans = (b - 1 + (a - 2)) / (a - 1);
    println!("{}", ans);
}
//  [rust]
#![allow(unused_imports)]
use proconio::marker::*;
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        a: usize,
        b: usize
    }

    let res = solve(a, b);
    println!("{}", res);
}

fn solve(a: usize, b: usize) -> usize {
    if b == 1 {
        0
    } else {
        (b - 1) / a + 1
    }
}
//  [rust]
#![allow(unused_imports)]
use proconio::marker::*;
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        a: usize,
        b: usize
    }

    let res = solve(a, b);
    println!("{}", res);
}

fn solve(a: usize, b: usize) -> usize {
    (b - 1) / a + 1
}
//  [swift]
let arr = readLine()!.characters.split{$0 == " "}.map{ Int(String($0))! }
let a = arr[0]
let b = arr[1]
var sum = a
var ret = 1



while sum < b {
  sum += a - 1
  ret += 1
}

if b == 1 {
  ret = 0
}

print(ret)
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let ab=readInts()
let a=ab[0]
let b=ab[1]
print(Int((a+b-3)/(a-1)))
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!-1},A=i[0],B=i[1]
print((B+A-1)/A)
//  [swift]
func readTwoInts(separator: String.Element = " ") -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: separator).map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func mainA() {
    let (A, B) = readTwoInts()

    var count = 0
    while true {
        count += 1
        if count * (A - 1) + 1 >= B {
            print(count)
            return
        }
    }
}

mainA()
//  [swift]
func readTwoInts(separator: String.Element = " ") -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: separator).map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func mainA() {
    let (A, B) = readTwoInts()

    var count = 0
    while true {
        count += 1
        if count * A >= B {
            print(count)
            return
        }
    }
}

mainA()
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ab=readInts()
let a=ab[0]
let b=ab[1]
var mouth=a
var ans=1

repeat{
  if(mouth>=b){print(ans)
               break}
  ans+=1
  mouth+=a-1
}while(true)
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.n())}return a}else{const a=t.input[0];t.input.shift();return Number(a)}},s:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.s())}return a}else{const a=t.input[0];t.input.shift();return String(a)}},c:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.c())}return a}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('')}else{t.input.shift()}return String(b)}},o:(...arg)=>{console.log(...arg)},abs:(a)=>{return Math.abs(a)},min:(...a)=>{return Math.min(...a)},max:(...a)=>{return Math.max(...a)},floor:(a)=>{return Math.floor(a)},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b})},desc:(ar:number[])=>{return ar.sort((a,b)=>{return b-a})},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]}};
const main=()=>{
  let[a,b]=t.n(2)
  t.o(t.floor((b-1)%(a-1))==0?t.floor((b-1)/(a-1)):t.floor((b-1)/(a-1))+1)
}
main()
//  [typescript]
import * as fs from 'fs'

function solve() {
  const [A, B] = (require('fs').readFileSync("/dev/stdin", "utf8") as string).split(" ").map((x: string):number => +x);
  let plug = 1;
  let cnt = 0;
  while (plug < B) {
    plug += A - 1;
    cnt++;
  }
  console.log(cnt);
}

solve();
//  [typescript]
const Main = (input) => {
  const inputs = input.split(" ").map(n => Number(n));
  const res = Math.ceil((inputs[1] - 1) / (inputs[0] -1));
  console.log(res);
};
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const lines=[];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

reader.on('line', function (line) {
  lines.push(line);
});

//入力後の処理
reader.on('close', function () {
    const input = (lines[0] as string).split(" ");
    const a = +input[0];
    const b = +input[1];

    if (a == b) {
        console.log(1);
        return;
    } 
    let res = 1;
    let numSockets = a;
    while(numSockets < b){
        numSockets =(numSockets - 1) + a;
        res++;
    }
    console.log(res);
});
//  [typescript]
// let message: string = "Hello World"
// console.log(message)
const lines=[];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

reader.on('line', function (line) {
  lines.push(line);
});

//入力後の処理
reader.on('close', function () {
    const input = (lines[0] as string).split(" ");
    const a = +input[0];
    const b = +input[1];

    let res = 1;
    let numSockets = a;
    if (a == b) {
        console.log(1);
    } else {
        while(numSockets < b){
            numSockets =(numSockets + a) - 1;
            res++;
        }
        console.log(res);
    }
});
//  [typescript]
let input = "8 9";

const main = (lines: string) => {
  const data = lines.split(" ");
  let division = parseInt(data[0], 10) - 1;
  let targetValue = parseInt(data[1], 10) - 1;
  let result = 0;

  console.log(Math.floor(targetValue / division));
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]
n = int(input())
L = [2, 1]

while len(L) < n+1:
    L.append(L[len(L)-1]+L[len(L)-2])

print(L[n])
//  [python]
n = int(input())
L = [2, 1]

for i in range(2, n+1):
    L_i =  L[i-1] + L[i-2]
    L.append(L_i)
print(L[n])
//  [python]
n=int(input())

a=[2,1]
for i in range(2,n+1):
    b=a[i-2]+a[i-1]
    a.append(b)
        
        
print(a[-1])
//  [python]
n = int(input())
l = [2,1]
if n == 1:
  print(2)
elif n == 2:
  print(1)
else:
  for i in range(n-1):
    l.append(l[-1]+l[-2])
  print(l[-1])
//  [python]
N = int(input())
ans = 0
L0 = 2
L1 = 1
for i in range(N-1):
  ans = L0 + L1
  L0 = L1
  L1 = ans
print(ans)
//  [python]
n = int(input())
def p(n):
    d = {0:2,1:1}
    if n in d:
        return d[n]
    d[n]= p(n-1)+p(n-2)
    return d[n]
print(p(n))
//  [java]
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;


public class Main {
	
	public static void main(String[] args) throws IOException {
		Main m = new Main();
		m.input();
		m.solve();
		m.output();
	}
	/*
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	/*/
	InputUtil in = new InputUtil();
	PrintWriter out = new PrintWriter(System.out);
	//*/
	int N = 0;
	long ans = 0;
	
	public void input() throws IOException {
		/*
		S = br.readLine();
		/*/
		N = in.nextInt();
		//*/
	}

	public void solve() throws IOException {
		long [] L = new long[N+1];
		L[0] = 2;
		L[1] = 1;
		for(int i=2; i<=N; i++){
			L[i] = L[i-1] + L[i-2];
		}
		ans = L[N];
	}
	
	public void output() {
		out.println(ans);
		out.flush();
	}
}

//*
class InputUtil {
	//Static Fields
	private static final int BUFSIZ = 100000;
	
	//Fields
	protected InputStream in;
	private byte[] buf = null;
	private int ptr = 0;
	private int max = -1;
	private DataInputStream dis = null;
	//Constructors
	public InputUtil() {this(System.in,BUFSIZ);}
	public InputUtil(InputStream in, int bufsiz) {
		initBuf(bufsiz);
		initIn(in);
	}
	
	//Methods
	//Initializer
	protected void initIn(InputStream in) {dis = new DataInputStream(this.in = in);}
	protected void initBuf(int bufsiz) {buf = new byte[bufsiz];}
	
	//buffer operation
	private void next() throws IOException {ptr++; readBuf();}
	private void readBuf() throws IOException {
		if(ptr >= max && dis.available()>0) {
			if(max>0) Arrays.fill(buf,0,max,(byte)0);
			max = dis.read(buf);
			ptr = 0;
		}
	}
	
	//Number Input Reader/Parser
	private boolean isNum(byte b) {return '0' <= b && b <= '9'; }
	private boolean isMinus(byte b) {return b=='-'; }

	private int _nextInt() throws IOException {
		int sign = 1;
		int res = 0;
		byte c;
		while (!isNum(c=buf[ptr]) && !isMinus(c)) 
			next();
		if (isMinus(buf[ptr])) {
			sign = -1;
			next();
		}
		while (isNum(c=buf[ptr])) {
			res *= 10;
			res += c - '0' ;
			next();
		}
		next();
		return sign * res;
	}
	
	public int nextInt() throws IOException {
		readBuf();
		return _nextInt();
	}

	public int[] nextInt(int[] result) throws IOException {
		readBuf();
		for(int i=0; i<result.length; i++) {
			result[i] = _nextInt();
		}
		return result;
	}
	
	//Close 
	public void close() throws IOException {
		if(!this.in.equals(System.in)) 
			this.in.close();
	}
}
//*/
//  [java]

    import javax.xml.crypto.Data;
    import java.math.BigDecimal;
    import java.util.*;
    import java.io.*;

    public class Main {

        public static void main(String[] args) throws IOException {

            //入力
            //BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            FastScanner sc = new FastScanner();
            int N = sc.nextInt();

            //出力
            long[] L = new long[87];
            L[0] = 2; L[1] = 1;
            for (int i = 2; i < 87 ; i++) L[i] = L[i - 1] + L[i - 2];
            System.out.println(L[N]);
        }

    }


    class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            }else{
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }
        private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
        private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
        public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while(true){
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                }else if(b == -1 || !isPrintableChar(b)){
                    return minus ? -n : n;
                }else{
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }
        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }
        public double nextDouble() { return Double.parseDouble(next());}
    }
//  [java]
//package reedeka;
import java.util.*;
import java.math.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();
		//System.close();
		long t1 = 2, t2 = 1;
		int i;
		long s = 0;
		for(i=2; i<=n; i++) {
			s = t1 + t2;
			t1 = t2;
			t2 = s;
		}
		System.out.println(s);
	}
}
//  [java]
//package reedeka;
import java.util.*;
import java.math.*;
public class bigInt {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();
		//System.close();
		long t1 = 2, t2 = 1;
		int i;
		long s = 0;
		for(i=2; i<=n; i++) {
			s = t1 + t2;
			t1 = t2;
			t2 = s;
		}
		System.out.println(s);
	}
}
//  [java]
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long ans = 0l;
        long l0 = 2l;
        long l1 = 1l;
        if(n == 1) {
            System.out.println(2);
            return;
        }
        for (int i = 1; i < n; i++) {
            ans = l0 + l1;
            l0 = l1;
            l1 = ans;
        }
        System.out.println(ans);
    }
}
//  [cpp]
#include <cstdio>
#include<cmath>
#include<cstring>

int main() {
	int n;
	scanf("%d",&n);
	long long numbers[99] = {2,1};
	for (int i = 2; i <= n;i++) {
		numbers[i] = numbers[i - 1] + numbers[i - 2];
	}
	printf("%lld\n",numbers[n]);
}
//  [cpp]
#include<stdio.h>

long long int dp[87];
int main()
{
	int n;
	scanf("%d",&n);
	dp[0] = 2;
	dp[1] = 1;
	for (int i = 2; i <= n; i++)
	{
		dp[i] = dp[i-1] + dp[i-2];
	}
	printf("%lld",dp[n]);
	return 0;
}
//  [cpp]
#include <stdio.h>
long long a[90] = {2,1};
int main()
{
	int n,i;
	scanf("%d", &n);
	if(n == 0)
	{
		printf("2\n");
	}
	if(n == 1)
	{
		printf("1\n");
	}
	if(n >=2)
	{
		for(i = 2; i <= n ;i++)
		{
			a[i] = a[i - 1] + a[i - 2];
		}
		printf("%lld\n",a[n]);
	}
	return 0;
}
//  [cpp]
#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<map>
using namespace std;
/*
time:
wa:
反省:
考察:
*/
int main() {
    int n; cin >> n;
    vector<long long> L(n);
    L[0] = 2;
    L[1] = 1; 
    for(int i = 2; i <= n; i++){
        L[i] = L[i-1] + L[i-2];
    }
    cout << L[n] << endl;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
int main(){
	int L0=2;
  	int L1=1;
  	int N;
  	cin>>N;
 	vector<long int>L(N);
  	L.at(0)=2LL;
  	L.at(1)=1LL;
  	if(N==1){
    	cout<<L.at(1)<<endl;
    }
  	else{
    	for(int i=2;i<N;i++){
        	L.at(i)=L.at(i-1)+L.at(i-2);
        }
      	cout<<L.at(N-1)<<endl;
    }
        
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
int main(){
	int L0=2;
  	int L1=1;
  	int N;
  	cin>>N;
 	vector<long int>L(N);
  	L(0)=2LL;
  	L(1)=1LL;
  	if(N==1){
    	cout<<L(1)<<endl;
    }
  	else{
    	for(int i=2;i<N;i++){
        	L(i)=L(i-1)+L(i-2);
        }
      	cout<<L(N-1)<<endl;
    }
        
}
//  [c]
#include <stdio.h>

int main(void)
{
    int i, N;
    long l[87];
    l[0] = 2;
    l[1] = 1;
    scanf("%d", &N);
    for (i = 2; i <= N; i++) {
        l[i] = l[i - 1] + l[i - 2];
    }

    printf("%ld\n", l[N]);

    return 0;
}
//  [c]
#include <stdio.h>

int main(){
        unsigned long long int N,count=0,i=1;
        unsigned long long int f[90];
        f[0] = 2;
        f[1] = 1;
        scanf("%llu",&N);
        if (N==0){
                printf("2");
        }
        if(N==1){
                printf("1");
        }

        while(i<=N){
                count=count +1;
                i = i+1;
                f[i] = f[i-1]+f[i-2];
        }
        if(N>=2){
                printf("%llu\n",f[i-1]);
        }

        return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    int N;
    long long a,b,c,i;
    a=1;
    b=2;
    scanf("%d",&N);
    for(i=0;i<N-1;i++){
        c=a;
        a=a+b;
        b=c;
    }
    printf("%lld\n",a);
    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
int n,i;
  scanf("%d",&n);
long long int dp[n+2];
  dp[0]=2;
  dp[1]=1;
  for(i=0;i<n;++i)
  {
  dp[i+2]=dp[i+1]+dp[i];
  }
  printf("%lld",dp[n-1]);

return 0;}
//  [c]
#include<stdio.h>
int main()
{
int n,i;
  scanf("%d",&n);
long long int dp[n];
  dp[0]=2;
  dp[1]=1;
  for(i=0;i<n;++i)
  {
  dp[i+2]=dp[i+1]+dp[i];
  }
  printf("%lld",dp[n-1]);

return 0;}
//  [c]
#include<stdio.h>
int main()
{
int n,i;
  scanf("%d",&n);
long long dp[n];
  dp[0]=2;
  dp[1]=1;
  for(i=0;i<n;++i)
  {
  dp[i+2]=dp[i+1]+dp[i];
  }
  printf("%lld",dp[n-1]);

return 0;}
//  [javascript]
"use strict";
    
const main = arg => {
    const N = parseInt(arg.split("\n")[0]);
	
    // 一部 JavaScript の扱える整数最大値を超えるので応急処置
    if (N === 77) {console.log("12360848946698171"); return;}
    if (N === 78) {console.log("20000273725560978"); return;}
    if (N === 79) {console.log("32361122672259149"); return;}
    if (N === 80) {console.log("52361396397820127"); return;}
    if (N === 81) {console.log("84722519070079276"); return;}
    if (N === 82) {console.log("137083915467899403"); return;}
    if (N === 83) {console.log("221806434537978679"); return;}
    if (N === 84) {console.log("358890350005878082"); return;}
    if (N === 85) {console.log("580696784543856761"); return;}
    if (N === 86) {console.log("939587134549734843"); return;}

    console.log(lucasMaster(N));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

function lucasMaster(n) {
  let answer = [2, 1];
  for ( let i = 2; i <= n; i++) {
    answer.push(answer[i-2] + answer[i-1]);
  }
  return answer.pop();
}
//  [javascript]
function main(s) {
	var n = Number(s.split("\n")[0]);
	if (n === 0) {console.log(2); return;}
	if (n === 1) {console.log(1); return;}
	if (n === 77) {console.log("12360848946698171"); return;}
	if (n === 78) {console.log("20000273725560978"); return;}
	if (n === 79) {console.log("32361122672259149"); return;}
	if (n === 80) {console.log("52361396397820127"); return;}
	if (n === 81) {console.log("84722519070079276"); return;}
	if (n === 82) {console.log("137083915467899403"); return;}
	if (n === 83) {console.log("221806434537978679"); return;}
	if (n === 84) {console.log("358890350005878082"); return;}
	if (n === 85) {console.log("580696784543856761"); return;}
	if (n === 86) {console.log("939587134549734843"); return;}
	var x = 2;
	var y = 1;
	var z = 0;
	for (var i = 2; i <= n; i++) {
		z = x + y;
		x = y;
		y = z;
	}
	console.log(z);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));