export default solve;

// =================================================
// ABC110C
// =================================================

// main
function main(lines) {
  console.log(solve(lines));
}

// interface
type Tuple = { value: number; count: number };

// solver
function solve(lines: string[]): string {
  const { N, evens, odds } = parseLines(lines);

  const evenTuples = getDescSortedTuplesByExistsNumberCount(evens);
  const oddTuples = getDescSortedTuplesByExistsNumberCount(odds);
  const steps: number[] = [];
  for (let i = 0; i < 2; i++) {
    for (let j = 0; j < 2; j++) {
      const evenTuple = evenTuples[i];
      const oddTuple = oddTuples[j];
      if (evenTuple && oddTuple && evenTuple.value === oddTuple.value) {
        steps.push(N - (evenTuple ? evenTuple.count : 0));
      } else {
        steps.push(N - (evenTuple ? evenTuple.count : 0) - (oddTuple ? oddTuple.count : 0));
      }
    }
  }
  return Math.min(...steps).toString();
}

// helpers
function getDescSortedTuplesByExistsNumberCount(nums: number[]): Tuple[] {
  const numsCountMap: Record<number, number> = nums.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const sortedTuples: Tuple[] = Object.keys(numsCountMap)
    .map(key => ({ value: +key, count: numsCountMap[key] }))
    .sort((x, y) => y.count - x.count);
  return sortedTuples;
}

function parseLines(lines: string[]) {
  const N = +lines[0];
  const nums = lines[1].split(' ').map(s => +s);
  const evens = nums.filter((v, i) => i % 2 === 0);
  const odds = nums.filter((v, i) => i % 2 !== 0);
  const obj = { N, nums, evens, odds };
  debug(obj);
  return obj;
}

// general helpers
function debug(message?: any, ...optionalParams: any[]) {
  if (!!process.env.LOCAL_DEBUG) console.log(message, ...optionalParams);
}

// reader
if (!process.env.LOCAL_DEBUG) {
  const { stdin: input, stdout: output } = process;
  input.resume().setEncoding('utf8');
  const lines = [];
  require('readline')
    .createInterface({ input, output })
    .on('line', line => lines.push(line))
    .on('close', () => main(lines));
}


export default solve;

// =================================================
// ABC110C
// =================================================

// main
function main(lines) {
  console.log(solve(lines));
}

// interface
type Pair = { value: number; count: number; even: boolean };

// solver
function solve(lines: string[]): string {
  const { N, evens, odds } = parseLines(lines);

  const evenNumsCountMap: Record<number, number> = evens.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const oddNumsCountMap: Record<number, number> = odds.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const evenTuples = Object.entries(evenNumsCountMap).map(v => ({ value: +v[0], count: v[1], even: true }));
  const oddTuples = Object.entries(oddNumsCountMap).map(v => ({ value: +v[0], count: v[1], even: false }));

  let even: Pair | null = null;
  let odd: Pair | null = null;
  const mixedTuples = evenTuples.concat(oddTuples).sort((x, y) => y.count - x.count);
  debug({ evenTuples, oddTuples, mixedTuples });
  loop: for (let i = 0; i < mixedTuples.length; i++) {
    if (mixedTuples[i].even && !even) {
      if (odd && mixedTuples[i].value !== odd.value) {
        even = mixedTuples[i];
      } else if (!odd) {
        even = mixedTuples[i];
      }
    } else if (!mixedTuples[i].even && !odd) {
      if (even && mixedTuples[i].value !== even.value) {
        odd = mixedTuples[i];
      } else if (!even) {
        odd = mixedTuples[i];
      }
    }
    if (even && odd) break loop;
  }
  debug({ even, odd });
  return (N / 2 - (even ? even.count : 0) + N / 2 - (odd ? odd.count : 0)).toString();
}

// helpers
function parseLines(lines: string[]) {
  const N = +lines[0];
  const nums = lines[1].split(' ').map(s => +s);
  const evens = nums.filter((v, i) => i % 2 === 0);
  const odds = nums.filter((v, i) => i % 2 !== 0);
  const obj = { N, nums, evens, odds };
  debug(obj);
  return obj;
}

// general helpers
function debug(message?: any, ...optionalParams: any[]) {
  if (!!process.env.LOCAL_DEBUG) console.log(message, ...optionalParams);
}

// reader
if (!process.env.LOCAL_DEBUG) {
  const { stdin: input, stdout: output } = process;
  input.resume().setEncoding('utf8');
  const lines = [];
  require('readline')
    .createInterface({ input, output })
    .on('line', line => lines.push(line))
    .on('close', () => main(lines));
}

// polyfills
if (!Object.entries) {
  Object.entries = function(obj) {
    var ownProps = Object.keys(obj),
      i = ownProps.length,
      resArray = new Array(i); // preallocate the Array
    while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];
    return resArray;
  };
}


export default solve;

// =================================================
// ABC110C
// =================================================

// main
function main(lines) {
  console.log(solve(lines));
}

// solver
function solve(lines: string[]): string {
  const { evens, odds } = parseLines(lines);

  const evenNumsMap: Record<number, number> = evens.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const oddNumsMap: Record<number, number> = odds.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const evenMaxs = Object.entries(evenNumsMap).map(v => [+v[0], v[1], 0]);
  const oddMaxs = Object.entries(oddNumsMap).map(v => [+v[0], v[1], 1]);

  let even = [];
  let odd = [];
  const mixed = evenMaxs.concat(oddMaxs).sort((x, y) => y[1] - x[1]);
  debug({ evenMaxs, oddMaxs, mixed });
  loop: for (let i = 0; i < mixed.length; i++) {
    if (mixed[i][2] === 0 && even.length === 0) {
      if (odd.length !== 0 && mixed[i][0] !== odd[0]) {
        even = mixed[i];
      } else if (odd.length === 0) {
        even = mixed[i];
      }
    } else if (mixed[i][2] === 1 && odd.length === 0) {
      if (even.length !== 0 && mixed[i][0] !== even[0]) {
        odd = mixed[i];
      } else if (even.length === 0) {
        odd = mixed[i];
      }
    }
    if (even.length !== 0 && odd.length !== 0) break loop;
  }
  debug({ even, odd });
  return (evens.length - (even[1] || 0) + odds.length - (odd[1] || 0)).toString();
}

// helpers
function parseLines(lines: string[]) {
  const N = +lines[0];
  const nums = lines[1].split(' ').map(s => +s);
  const evens = nums.filter((v, i) => i % 2 === 0);
  const odds = nums.filter((v, i) => i % 2 !== 0);
  const obj = { N, nums, evens, odds };
  debug(obj);
  return obj;
}

// general helpers
function debug(message?: any, ...optionalParams: any[]) {
  if (!!process.env.LOCAL_DEBUG) console.log(message, ...optionalParams);
}

// reader
if (!process.env.LOCAL_DEBUG) {
  const { stdin: input, stdout: output } = process;
  input.resume().setEncoding('utf8');
  const lines = [];
  require('readline')
    .createInterface({ input, output })
    .on('line', line => lines.push(line))
    .on('close', () => main(lines));
}

// polyfills
if (!Object.entries) {
  Object.entries = function(obj) {
    var ownProps = Object.keys(obj),
      i = ownProps.length,
      resArray = new Array(i); // preallocate the Array
    while (i--) resArray[i] = [ownProps[i], obj[ownProps[i]]];
    return resArray;
  };
}


export default solve;

// =================================================
// ABC110C
// =================================================

// main
function main(lines) {
  console.log(solve(lines));
}

// solver
function solve(lines: string[]): string {
  const { evens, odds } = parseLines(lines);

  const evenNumsMap: Record<number, number> = evens.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const oddNumsMap: Record<number, number> = odds.reduce((acc, v) => {
    !acc[v] ? (acc[v] = 1) : acc[v]++;
    return acc;
  }, {});
  const evenMaxs = Object.entries(evenNumsMap).map(v => [+v[0], v[1], 0]);
  const oddMaxs = Object.entries(oddNumsMap).map(v => [+v[0], v[1], 1]);

  let even = [];
  let odd = [];
  const mixed = evenMaxs.concat(oddMaxs).sort((x, y) => y[1] - x[1]);
  debug({ evenMaxs, oddMaxs, mixed });
  loop: for (let i = 0; i < mixed.length; i++) {
    if (mixed[i][2] === 0 && even.length === 0) {
      if (odd.length !== 0 && mixed[i][0] !== odd[0]) {
        even = mixed[i];
      } else if (odd.length === 0) {
        even = mixed[i];
      }
    } else if (mixed[i][2] === 1 && odd.length === 0) {
      if (even.length !== 0 && mixed[i][0] !== even[0]) {
        odd = mixed[i];
      } else if (even.length === 0) {
        odd = mixed[i];
      }
    }
    if (even.length !== 0 && odd.length !== 0) break loop;
  }
  debug({ even, odd });
  return (evens.length - (even[1] || 0) + odds.length - (odd[1] || 0)).toString();
}

// helpers
function parseLines(lines: string[]) {
  const N = +lines[0];
  const nums = lines[1].split(' ').map(s => +s);
  const evens = nums.filter((v, i) => i % 2 === 0);
  const odds = nums.filter((v, i) => i % 2 !== 0);
  const obj = { N, nums, evens, odds };
  debug(obj);
  return obj;
}

// general helpers
function debug(message?: any, ...optionalParams: any[]) {
  if (!!process.env.LOCAL_DEBUG) console.log(message, ...optionalParams);
}

// reader
if (!process.env.LOCAL_DEBUG) {
  const { stdin: input, stdout: output } = process;
  input.resume().setEncoding('utf8');
  const lines = [];
  require('readline')
    .createInterface({ input, output })
    .on('line', line => lines.push(line))
    .on('close', () => main(lines));
}


n,d=map(int,input().split())
print(-(-n//(d*2+1)))


n,d=map(int,input().split())
c=n//(2*d+1)
if n%(2*d+1)==0:print(c)
else:print(c+1)


import math

# スペース区切り整数の入力
N, D = map(int, input().split())
# 最小の監視員数の出力
print("{}".format(math.ceil(N / (2 * D + 1))))


a,b = map(int,input().split())
ans = a//(b+1)
if ans == a/(b+1):
  print(ans)
else:
  print(ans + 1)


n, d = map(int, input().split())
c = 0
while n > d:
    d = d*2 + 1
    c += 1
if c == 0:
    print(1)
else:
    print(c)


import math
x,y =map(int,input().split())
print(math.ceil(x/((y*y)+1)))


import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        // 入力受取
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        String line1 = input.readLine();

        String[] arr = line1.split(" ");
        int N = Integer.parseInt(arr[0]);
        int D = Integer.parseInt(arr[1]);

        // 1人が見れる本数
        int a = D * 2 + 1;
        // N本を見るために必要な監視員
        int b = N / a;
        if(N % a > 0) b++;

        System.out.println(b);
    }
}


import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax
    static final int INF = 1_000_000_000; // 10^9
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		int n = saori.saori_hayami();
		int d = saori.saori_hayami();
		boolean flg = true;
		int num = 0;
		int ans = 0;
		while(flg){
			if(num >= n){
				flg = false;
				break;
			}
			num += 1;
			num +=  2*d;
			ans++;
		}
		System.out.println(ans);
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() {
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) {
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() {
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }

}


/*
Stay innocent, be naive.
But still dream big.
Dream big to the point that it is beyond your ability and endeavour to achieve it.
So dream big and don�t lose your innocence.
*/
import java.util.*;
import java.io.*;

   public class Main
   {
      public static void main(String args[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         int D = Integer.parseInt(st.nextToken());
         int boof = 2*D+1;
         int res = N/boof;
         if(N%boof > 0)
            res++;
         System.out.println(res);
      }
      public static void sort(int[] arr)
      {
         //stable heap sort
         PriorityQueue<Integer> pq = new PriorityQueue<Integer>();
         for(int a: arr)
            pq.add(a);
         for(int i=0; i < arr.length; i++)
            arr[i] = pq.poll();
      }
   }


import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int d = sc.nextInt() + 1;
    int ans = 1;

    while (true) {
      d *= 2;
      if (d <= n) {
        ans++;
      } else {
        break;
      }
    }

    System.out.println(ans);

  }
}


import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int d = sc.nextInt() + 1;
    int ans = 0;

    while (d <= n) {
      ans++;
      d *= 2;
    }

    System.out.println(ans);

  }
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();
		int now = D*2+1;
		int count =1;
		while(N>D) {
			now +=D*2+1;
			count++;
		}
		System.out.println(count);
	}
}


#include <stdio.h>

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

    int l = 1 + (d << 1);
    int res = n / l;
    if (n % l > 0)
        res++;
    printf("%d", res);
    return 0;
}


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

int main(){

    int n,d; cin>>n>>d;

    int count=0,rem[n],j=0;

    while(n > 0){

        n -= 2 * d + 1;

        count++;
    }

cout<<count<<endl;

return 0;
}


#include <iostream>
#include <math.h>
using namespace std;

int N, D;
int c=0;

int main(){
  if(scanf("%d %d", &N, &D)==0);
  int i=0;
  while((2*D+1)*i<N)i++;

  printf("%d", i);

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define eb emplace_back
#define precision(n) cout << fixed << setprecision(n);
#define fast {ios_base::sync_with_stdio(false);cin.tie(NULL);}
int main()
{
    int n,d;
    int cnt=0;
    cin>>n>>d;
    for(int i=1;i<=n;i++)
    {
        if(i-d>=1&&i+d<=n)
        {
            cnt++;
        }

    }
    cout<<cnt<<endl;
    return 0;
}


#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef vector<int>     Vi;
typedef vector<ll>      Vl;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD1    = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define psb push_back
#define epb emplace_back
#define psf push_front
#define mkp make_pair
#define fst first
#define scd second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define repbit(bit, n)  for(int bit = 0; (bit) < (1 << (n)); ++(bit))
#define ifbit(bit, i)   if((bit) & (1 << (i)))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/

/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int n, d; cin >> n >> d;
    cout << n/((d+1)*2) + 1 << endl;

return 0;
}


#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef vector<int>     Vi;
typedef vector<ll>      Vl;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD1    = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define psb push_back
#define epb emplace_back
#define psf push_front
#define mkp make_pair
#define fst first
#define scd second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define repbit(bit, n)  for(int bit = 0; (bit) < (1 << (n)); ++(bit))
#define ifbit(bit, i)   if((bit) & (1 << (i)))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/

/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int n, d; cin >> n >> d;
    cout << floor(n/((d+1)*2)) + 1 << endl;

return 0;
}


#include <stdio.h>
#include <string.h>
#include <math.h>

int main(void)
{
    int n, d, ret;
    scanf("%d%d", &n, &d);
    if(n%(2*d+1)==0) ret=n/(2*d+1);
    else ret=n/(2*d+1)+1;

    printf("%d", ret);

    return 0;
}


#include <stdio.h>

int main(void) {
    int n, d, ans = 1;
    scanf("%d%d", &n, &d);
    int monitor_man         = d + 1;
    int monitor_range_right = monitor_man + d;
    while ( monitor_range_right < n ) {
        ans++;
        monitor_man += (2 * d + 1);
        monitor_range_right = monitor_man + d;
    }
    printf("%d\n", ans);
    return 0;
}


#include <stdio.h>

int main()
{
    int n, d , a;
    scanf("%d %d", &n, &d);
    d = d * 2 + 1;
    a = n % d;
    if(a)
     a = 1;
    printf("%d", n / d + a);
}


#niclude<stdio.h>
int main(){
  int n,d;
  scanf("%d%d",&n,&d);
  int k;
  k=2*d+1;
  if(n%k==0)
    printf("%d",n/k);
  else
    printf("%d",n/k+1);
}


/*  ex5_2
    L40S38  */
#include<stdio.h>

int main(void){
    int tribonacci[1000000];
    int n;
    scanf("%d",&n);
    tribonacci[0]=0;
    tribonacci[1]=0;
    tribonacci[2]=1;
    if(n>3){
        for(int i=2;i<n-1;i++){
            tribonacci[i+1]=tribonacci[i]+tribonacci[i-1]+tribonacci[i-2];
        }
    }
    printf("%d\n",tribonacci[n-1]);
    return 0;
}


#include <stdio.h>

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

  int a = n / (2*d);
  int b = n % (2*d);
  if(b>=d) a++;

  printf("%d",a);
}


input = require('fs').readFileSync('/dev/stdin', 'utf8')
N = input.split(' ')[0] * 1
D = input.split(' ')[1] * 1
console.log(Math.ceil(N / (D * 2 + 1)))


const input = require('fs').readFileSync('/dev/stdin','utf8').split("\n")[0]
const lst = input.split(" ").map(x => Number(x))
const N = lst[0]
const D = lst[1]
console.log(Math.floor((N+D*2)/(D*2+1)))


function Main(input) {
  	var inputArray = input.split(' ');
    var appleN = inputArray[0];
    var lookD = inputArray[1] * 2 + 1;
    var ans = appleN / lookD;
    if (appleN % lookD != 0) {
       console.log(Math.floor(ans + 1));
        } else {
  		 console.log(ans);
        }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict';
function main(input) {
  const arr = input.trim().split(' ');
  const a = Number(arr[0]);
  const b = Number(arr[1]);

  console.log(Math.ceil(a / (b * 2)));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	input = input.split(" ").map(Number);
	console.log(Math.ceil(input[0]/(input[1]+1)))

}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


function Main(input) {
	input = input.split(" ").map(Number);
	console.log(math.ceil(input[0]/(input[1]+1)))

}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());


package main

import "fmt"

func main() {
	var N, D int
	fmt.Scanf("%d %d", &N, &D)
	n := 2*D + 1
	ans := 1
	N -= n
	for N >= 1 {
		N -= n
		ans++
	}
	fmt.Println(ans)
}


package main

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

func main() {
	In := readLineInt()
	N, D := In[0], In[1]

	i := 1
	for {
		if 2*D*i+i >= N {
			fmt.Println(i)
			return
		}
		i++
	}
}

/////////////////////////////////////////

func readLineInt() []int {
	result := make([]int, 0)
	for _, v := range strings.Split(readLine(), " ") {
		i, _ := strconv.Atoi(v)
		result = append(result, i)
	}
	return result
}

var reader = bufio.NewReaderSize(os.Stdin, 1e6)

func readLine() string {
	result := make([]byte, 0, 1e6)
	for {
		line, remains, e := reader.ReadLine()
		if e != nil {
			panic(e)
		}
		result = append(result, line...)
		if !remains {
			break
		}
	}
	return string(result)
}


package main

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

func main() {
	ints := readLineAsInts()
	fmt.Println(math.Ceil(float64(ints[0]) / float64(2*ints[1]+1)))
}

func toInt(s string) int {
	i, e := strconv.Atoi(s)
	if e != nil {
		fmt.Println(e)
	}
	return i
}

func nextLine(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func readInt() int {
	var scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return toInt(nextLine(scanner))
}

func readStr() string {
	var scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	return nextLine(scanner)
}

func readLineAsStr() string {
	var scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanLines)
	return nextLine(scanner)
}

func readLineAsInts() []int {
	var scanner = bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanLines)
	s := strings.Split(nextLine(scanner), " ")
	ints := make([]int, len(s))
	for i, str := range s {
		ints[i] = toInt(str)
	}
	return ints
}


package main

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

const (
	defaultBufferSize = 1024
	maxBufferSize     = 1e6
	Mod               = 1e9 + 7
)

var sc = bufio.NewScanner(os.Stdin)

// sc.Buffer(make([]byte, defaultBufferSize), maxBufferSize)

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

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

func readInt64() int64 {
	sc.Scan()
	i, err := strconv.ParseInt(sc.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return int64(i)
}

func readfloat64() float64 {
	sc.Scan()
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return f
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

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

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

func ModComb(n, k int) int {
	if k == 0 {
		return 1
	}
	x, y := n, k
	for i := 1; i < k; i++ {
		x = x * (n - i) % Mod
		y = y * (k - i) % Mod
	}
	inv := ModInv(y)
	return x * inv % Mod
}

func ModFact(x int) int {
	fact := 1
	for i := 1; i <= x; i++ {
		fact = fact * i % Mod
	}
	return fact
}

func ModInv(x int) int {
	return ModPow(x, Mod-2)
}

func ModPow(a, n int) int {
	res := 1
	for n > 0 {
		if n%2 != 0 {
			res = res * a % Mod
		}
		a = a * a % Mod
		n /= 2
	}
	return res
}

func pow(a, n int) int {
	if n == 0 {
		return 1
	}

	ans := 0
	if n%2 == 0 {
		ans = pow(a*a, n/2)
	} else {
		ans = a * pow(a*a, (n-1)/2)
	}
	return ans
}

func intSliceReverse(slice []int) []int {
	for i, j := 0, len(slice)-1; i < j; i, j = i+1, j-1 {
		slice[i], slice[j] = slice[j], slice[i]
	}
	return slice
}

func stringReverse(str string) string {
	runes := []rune(str)
	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 primeFactorization(x int) map[int]int {
	result := make(map[int]int, 0)
	for i := 2; i*i <= x; i++ {
		for x%i == 0 {
			result[i]++
			x /= i
		}
	}
	if x != 1 {
		result[x]++
	}
	return result
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	for i := 2; i*i <= x; i++ {
		if i == x {
			continue
		}
		if x%i == 0 {
			return false
		}
	}
	return true
}

func main() {
	sc.Split(bufio.ScanWords)
	n, d := readInt(), readInt()

	if d > n {
		fmt.Println(1)
		return
	}

	ans := 0
	for i := d; i <= n; i = i + d + d {
		ans++
	}
	fmt.Println(ans)
}


package main

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

const (
	defaultBufferSize = 1024
	maxBufferSize     = 1e6
	Mod               = 1e9 + 7
)

var sc = bufio.NewScanner(os.Stdin)

// sc.Buffer(make([]byte, defaultBufferSize), maxBufferSize)

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

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

func readInt64() int64 {
	sc.Scan()
	i, err := strconv.ParseInt(sc.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return int64(i)
}

func readfloat64() float64 {
	sc.Scan()
	f, err := strconv.ParseFloat(sc.Text(), 64)
	if err != nil {
		panic(err)
	}
	return f
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

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

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

func ModComb(n, k int) int {
	if k == 0 {
		return 1
	}
	x, y := n, k
	for i := 1; i < k; i++ {
		x = x * (n - i) % Mod
		y = y * (k - i) % Mod
	}
	inv := ModInv(y)
	return x * inv % Mod
}

func ModFact(x int) int {
	fact := 1
	for i := 1; i <= x; i++ {
		fact = fact * i % Mod
	}
	return fact
}

func ModInv(x int) int {
	return ModPow(x, Mod-2)
}

func ModPow(a, n int) int {
	res := 1
	for n > 0 {
		if n%2 != 0 {
			res = res * a % Mod
		}
		a = a * a % Mod
		n /= 2
	}
	return res
}

func pow(a, n int) int {
	if n == 0 {
		return 1
	}

	ans := 0
	if n%2 == 0 {
		ans = pow(a*a, n/2)
	} else {
		ans = a * pow(a*a, (n-1)/2)
	}
	return ans
}

func intSliceReverse(slice []int) []int {
	for i, j := 0, len(slice)-1; i < j; i, j = i+1, j-1 {
		slice[i], slice[j] = slice[j], slice[i]
	}
	return slice
}

func stringReverse(str string) string {
	runes := []rune(str)
	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 primeFactorization(x int) map[int]int {
	result := make(map[int]int, 0)
	for i := 2; i*i <= x; i++ {
		for x%i == 0 {
			result[i]++
			x /= i
		}
	}
	if x != 1 {
		result[x]++
	}
	return result
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	for i := 2; i*i <= x; i++ {
		if i == x {
			continue
		}
		if x%i == 0 {
			return false
		}
	}
	return true
}

func main() {
	sc.Split(bufio.ScanWords)
	n, d := readInt(), readInt()

	ans := 0
	for i := d; i <= n; i = i + d + d {
		ans++
	}
	fmt.Println(ans)
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
	"strconv"
	"sort"
       "math"
)

// -----------------------------------------------------------------------------

// IO helper functions

// Returns next token from input.  It must be initialized by SetInput()
// before the first call.
var nextToken func() ([]byte, error)
var nextLine func() ([]byte, error)

// Holds a buffer for output.  It must be initialized by SetOutput().
// All IO fucntions (read*() and [e]print*()) should write to OutputWriter
// instead of this.
var OutputBuffer *bufio.Writer

// Holds an io.Writer.  It must be initialized by SetOutput()
var OutputWriter io.Writer

// Set IO functions for interactive input/output.
func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

// Setup OutputBuffer and OutputWriter.
func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

// Flushes OutputBuffer
func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

// Returns true if c is a white space
func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func IsNewLine(c byte) bool {
	switch c {
	case '\n', '\r':
		return true
	}
	return false
}

// Setup nextToken with input buffer.
func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial

	restLn := func() ([]byte, error) {
		for i < len(b) && IsNewLine(b[i]) {
			i++
		}
		if i == len(b) {
			return nil, io.ErrUnexpectedEOF
		}
		j := i
		for i < len(b) && !IsNewLine(b[i]) {
			i++
		}
		return b[j:i], nil
	}

	initialLn := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextLine = restLn
		return restLn()
	}
	nextLine = initialLn
}

// Setup nextToken without input buffer.
func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

// -----------------------------------------------------------------------------

// IO functions

// Reads next token and return it as []byte
func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}

// Reads next token and return it as string
func reads() string {
	return string(readb())
}

// Read next line as []byte
func readbln() []byte {
	b, err := nextLine()
	if err != nil {
		panic(err)
	}
	return b
}

// Read next line as string
func readsln() string {
	return string(readbln())
}

// Reads next token and return it as int64
func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

// Reads next token and return it as int
func readi() int {
	return int(readll())
}

// Reads next token and return it as float64
func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

// ReadIntSlice returns an integer slice that has n integers.
func readislice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readi()
	}
	return b
}

// ReadInt64Slice returns as int64 slice that has n integers.
func readllslice(n int) []int64 {
	b := make([]int64, n)
	for i := 0; i < n; i++ {
		b[i] = readll()
	}
	return b
}

// Write args to OutputWriter with the format f
func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

// Write args to OutputWriter without format
func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

// Write args to stderr with the format f
func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// Write args to stderr without format
func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

const (
	// big prime
	MOD = 1000000007
	INF = math.MaxInt64
)

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func minll(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func maxll(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func absll(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

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

// egcd(a, b) returns d, x, y:
//   d is gcd(a,b)
//   x, y are  integers that satisfy ax + by = d
func egcd(a, b int) (int, int, int) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcd(b, a%b)
	return d, y, x - a/b*y
}

func egcdll(a, b int64) (int64, int64, int64) {
	if b == 0 {
		return a, 1, 0
	}
	d, x, y := egcdll(b, a%b)
	return d, y, x - a/b*y
}

func gcd(a, b int) int {
	d, _, _ := egcd(a, b)
	return d
}

func gcdll(a, b int64) int64 {
	d, _, _ := egcdll(a, b)
	return d
}

func lcm(a,b int) int{
  return a * b / gcd(a, b)
}

// lower_bound
func bisectLeft(a []int, x int) int {
    return sort.SearchInts(a, x)
}

// upper_bound
func bisectRight(a []int, x int) int {
    return sort.Search(len(a), func(i int) bool { return a[i] > x })
}

// set up IO functions
func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func main() {
  defer Flush()

  N, D := readi(), readi()

  div := N / (D * 2 + 1)
  mod := N % (D * 2 + 1)

  if mod != 0 {
    println(div)
  } else {
    println(div+1)
  }

}


N,D = gets.split.map(&:to_i)
num = 1
left = 1
right = left + D + D
loop do
    break if right >= N
    num += 1
    left = right + 1
    right = left + D + D
end
puts num


N, D = gets.split.map(&:to_i)
puts (N/(D*2+1.0)).ceil


line = gets.split(' ').map(&:to_i)

N = line[0]
D = line[1]

if N % (2 * D + 1) == 0 then
  print N / (2 * D + 1)
else
  print N / (2 * D + 1) + 1
end


n, d = gets.chomp.split(" ").map(&:to_i)
puts n / ( 2 * d + 1)


line = gets.split(' ').map(&:to_i)

N = line[0]
D = line[1]

if N % (2 * D +1) == 0 then
  print N / (2 * D + 1)
else
  print N / (2 * D + 1) + 1
end


line = gets.split(' ').map(&:to_i)
N = line[0]
D = line[1]
hanni = 2*D
if N%hanni== 0 then
  puts(N/hanni)
else
  puts(N/hanni+1)
end


use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.split_whitespace();
	let n = match iter.next().unwrap().parse::<i32>() {
		Ok(m) => m,
		_ => panic!(""),
	};
	let d = match iter.next().unwrap().parse::<i32>() {
		Ok(m) => m,
		_ => panic!(""),
	};
	println!("{}", (n+2*d)/(2*d + 1));
}


#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

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

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

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

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

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn f(s: &Vec<i32>) -> bool{

    return true;
}

use std::iter::Iterator;
use std::cmp;

fn main() {
    input! {
       n : i32,
        d : i32
    }

    let mut cnt = 0;
    let mut target = n;
    for i in 0..20 {

        target = target - (d * 2 + 1);
        cnt = cnt + 1;

        if target <= 0 {
            break;
        }
    }

    println!("{}", cnt);

}


use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut iter = buf.split_whitespace();
    let n: usize = iter.next().unwrap().parse().unwrap();
    let d: usize = iter.next().unwrap().parse().unwrap();

    println!("{}", (n - 1) / (2 * d + 1) + 1);
}


use std::io;

fn main() {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let mut iter = buf.split_whitespace();
	let n = match iter.next().unwrap().parse::<i32>() {
		Ok(m) => m,
		_ => panic!(""),
	};
	let d = match iter.next().unwrap().parse::<i32>() {
		Ok(m) => m,
		_ => panic!(""),
	};
	let mut cnt = 1;
	let mut i = 1;
	if i < n {
		i = i + 2*d + 1;
		cnt += 1;
	}
	println!("{}", cnt);
}


use proconio::input;

fn main() {
    input! {
        n: usize, d: usize,
    }
    let d = 2 * d + 1;
    println!("{}", (n+d-1)/d);
}


fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    let mut v2 = Vec::new();
    for _ in 0..n {
        let mut s = String::new();
        std::io::stdin().read_line(&mut s).ok();
        let v = s.trim().split_whitespace()
            .map(|e| e.parse().ok().unwrap()).collect();
        v2.push(v);
    }
    v2
}
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace()
        .map(|e| e.parse().ok().unwrap()).collect()
}

fn main(){
    let stdin = read_vec::<isize>();
    let (n, d)=(stdin[0], stdin[1]);
    let a = n/(d*2+1);
    let amari = {
        if n%(d*2)==0{
            0
        }else{
            1
        }
    };

    println!("{:?}", a+amari);
}


func readInts() -> [Int]{
    return readLine()!.split(separator: " ").map{Int($0)!};
}
let a = readInts();
let N = a[0];
let D = a[1];
print(N / (2 * D + 1) + (N % (2 * D + 1) + 2 * D) / (2 * D + 1))


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let nd=readInts()
let n=nd[0]
let d=nd[1]
print(Int((n+2*d)/(2*d+1)))


import Foundation

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

let nd=readInts()
let n:Double=Double(nd[0])
let d:Double=Double(nd[1])

print(Int(ceil(n/(2*d+1))))


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let nd=readInts()
let n=nd[0]
let d=nd[1]
print(Int(n/(2*d+1))+1)


const main = (lines: string) => {
  const data = lines.split(" ");
  const treeSize = parseInt(data[0], 10);
  const coverableRange = parseInt(data[1], 10) * 2 + 1;

  console.log(Math.ceil(treeSize / coverableRange));
};

main(require("fs").readFileSync("/dev/stdin", "utf8"));


import * as fs from 'fs';

namespace AtCoder.abc134 {
    class ProgramB {
        args: string[];

        // 6 2
        // 2
        constructor(args: string[]) {
            this.args = args;
        }

        main() {
            const [n, d]: number[] = this.args[0].split(' ').map(x => parseInt(x, 10));

            const ans: number = (n % (d * 2 + 1) > 0) ? Math.floor(n / (d * 2 + 1) + 1) : n / (d * 2 + 1);
            console.log(ans);

        }
    }

    const args: string[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n');
    new ProgramB(args).main();
}


import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
//const n = +input[0];
//const a = [];
//for(let i=0;i<n;i++){
//	a.push(input[i+1].split(" ").map((x:string):number=>+x));
//}

//const [n, m] = input[0].split(" ").map((x: string): number => +x);
//const a = input[1].split(" ").map((x: string): number => +x);

function compareFunc(a, b){
    return a-b;
}

const [n, d] = input[0].split(' ').map((x: string): number => +x);

const kanshi:number = d*2 +1;

if(n % kanshi === 0){
    console.log(n/kanshi);
}else{
    console.log(Math.floor(n/kanshi)+1);
}


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const [N, D] = lines[0].split(" ").map(Number);

  if (N === 1) {
    console.log(1);
  } else if (D === 1) {
    console.log(1);
  } else if (D === 2) {
    console.log(2);
  } else {
    console.log(D - 1);
  }
});


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const [N, D] = lines[0].split(" ").map(Number);
  console.log(D > 1 ? D - 1 : D);
});


process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  const [N, D] = lines[0].split(" ").map(Number);
  console.log(D - 1);
});


a,b,c,d = map(int, input().split())

while True:
    c -= b
    if c <= 0:
        print("Yes")
        exit()
    a -= d
    if a <= 0:
        print("No")
        exit()


a,b,c,d = map(int,input().split())
taka = [a,b]
ao = [c,d]
flag = True

while a > 0 or c > 0:
    c -= b
    if c <= 0:
        break
    a -= d
    if a <= 0:
        flag = False
        break

if flag:
    print("Yes")
else:
    print("No")


def resolve():
    a, b, c, d = map(int, input().split())
    takahashiturn = True
    while a > 0 and c > 0:
        if takahashiturn:
            c -= b
            takahashiturn = False
        else:
            a -= d
            takahashiturn = True
    print("Yes" if c <= 0 else "No")

if __name__ == '__main__':
    resolve()


# 高橋君のモンスター　体力A、攻撃力B
# 青木君のモンスター　体力C、攻撃力D
# 高橋->青木->高橋->青木->...の順に攻撃する
# 高橋勝つならYes、負けるならNo

a, b, c, d = map(int, input().split())

while a > 0 and c > 0:
    c -= b
    if c <= 0:
        print("Yes")
        break

    a -= d
    if d <= 0:
        print("No")
        break


# 高橋君のモンスター　体力A、攻撃力B
# 青木君のモンスター　体力C、攻撃力D
# 高橋->青木->高橋->青木->...の順に攻撃する
# 高橋勝つならYes、負けるならNo

a, b, c, d = map(int, input().split())

while a > 0 and c > 0:
    c -= b
    if c <= 0:
        print("Yes")

    a -= d
    if d <= 0:
        print("No")


A, B, C, D = map(int,input().split())

while C > 0:
    C = C - B
    if C <= 0:
        print('Yes')
        break

while A > 0:
    A = A - D
    if A <= 0:
        print('No')
        break


import java.util.*;
import java.io.*;

public class Main {

	private static void solve(){
		//Implement solution here.
		int A = ni();
		int B = ni();
		int C = ni();
		int D = ni();
		int turn_1 = C / B + (C % B != 0 ? 1 : 0);
		int turn_2 = A / D + (A % D != 0 ? 1 : 0);
		System.out.println(turn_1 <= turn_2 ? "Yes" : "No");
	}

	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		boolean hasNext = true;
		while(hasNext){
			solve();
			try{
				br.mark(1);
				if(br.read() > 0){
					br.reset();
					System.out.println("---");
				} else {
					hasNext = false;
				}
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main
{
	public static void main(String[] Arguments) throws IOException
	{
		BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer ST = new StringTokenizer(BR.readLine());
		int A = Integer.parseInt(ST.nextToken()), B = Integer.parseInt(ST.nextToken()), C = Integer.parseInt(ST.nextToken()), D = Integer.parseInt(ST.nextToken());
		boolean takaTurn = true;
		while (A > 0 && C > 0)
		{
			if (takaTurn) C -= B;
			else A -= D;
			takaTurn = !takaTurn;
		}
		System.out.println((A > 0) ? "Yes" : "No");
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Supplier;

public class Main {
    final static long MOD07 = 1_000_000_007;
    final static long MOD09 = 1_000_000_009;

    public static void main(String[] args) {
        final FastScanner fs = new FastScanner();
        int A = fs.nextInt();
        int B = fs.nextInt();
        int C = fs.nextInt();
        int D = fs.nextInt();
        boolean a = true;
        while (A > 0 && C > 0) {
            if (a) {
                C -= B;
            } else {
                A -= D;
            }
            a = !a;
        }
        PrintWriter out = new PrintWriter(System.out);
        if (A > 0) {
            out.println("Yes");
        } else {
            out.println("No");
        }
        out.flush();
    }

    static void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    // Execute func for all patterns can be represented with n bit.
    // O(n2^n)
    static void forAllBit(int n, Consumer<List<Boolean>> func) {
        for (int i = 0; i < (1 << n); i++) {
            List<Boolean> arg = new ArrayList();
            for (int j = 0; j < n; j++) {
                boolean isJthBitSet = ((i >> j) & 1) == 1;
                arg.add(isJthBitSet);
            }
            func.accept(arg);
        }
    }

    static class Pair<F extends Comparable<F>, S extends Comparable<S>> implements Comparable<Pair<F, S>> {
        F f;
        S s;

        Pair() {
        }

        Pair(F f, S s) {
            this.f = f;
            this.s = s;
        }

        Pair(Pair<F, S> p) {
            f = p.f;
            s = p.s;
        }

        @Override
        public int compareTo(Pair<F, S> p) {
            if (f.compareTo(p.f) != 0) {
                return f.compareTo(p.f);
            }
            return s.compareTo(p.s);
        }

        @Override
        public int hashCode() {
            return f.hashCode() ^ s.hashCode();
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || this.f == null || this.s == null) {
                return false;
            }
            if (this.getClass() != o.getClass()) {
                return false;
            }
            Pair p = (Pair) o;
            return this.f.equals(p.f) && this.s.equals(p.s);
        }

        @Override
        public String toString() {
            return "{" + f.toString() + ", " + s.toString() + "}";
        }
    }

    public static int gcd(int a, int b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static boolean isPrime(int n) {
        for (int i = 2; i <= ((int) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return n != 1;
    }

    public static void reverse(int[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            int temp = array[i];
            array[i] = array[array.length - i - 1];
            array[array.length - i - 1] = temp;
        }
    }

    public static void reverse(long[] array) {
        for (int i = 0; i < array.length / 2; i++) {
            long temp = array[i];
            array[i] = array[array.length - i - 1];
            array[array.length - i - 1] = temp;
        }
    }

    public static boolean isPrime(long n) {
        for (long i = 2; i <= ((long) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return n != 1;
    }

    public static Map<Long, Long> primeFactor(long n) {
        Map<Long, Long> map = new HashMap<>();
        long num = n;
        for (long i = 2; i <= ((long) Math.sqrt(n)); i++) {
            while (num % i == 0L) {
                map.put(i, map.getOrDefault(i, 0L) + 1L);
                num /= i;
            }
        }
        if (num != 1) {
            map.put(num, 1L);
        }

        return map;
    }

    public static List<Long> divisors(long n) {
        List<Long> list = new ArrayList<>();
        for (long i = 1; i <= ((long) Math.sqrt(n)); i++) {
            if (n % i == 0) {
                list.add(i);
                if (i != n / i) {
                    list.add(n / i);
                }
            }
        }

        return list;
    }

    public static int lcm(int a, int b) {
        return a / gcd(a, b) * b;
    }

    public static int nCk(int n, int k, int M) {
        long ret = 1;
        int min = Math.min(k, n - k);
        for (int i = 1; i <= min; i++) {
            ret = (ret * pow(i, M - 2, M)) % M;
        }
        for (int i = n - min + 1; i <= n; i++) {
            ret = (ret * i) % M;
        }
        return (int) ret;
    }

    //return a^b mod M O(logB)
    public static long pow(long a, long b, int M) {
        long ret = 1;
        long tmp = a;
        while (b > 0) {
            if ((b & 1) == 1) ret = (ret * tmp) % M;
            tmp = (tmp * tmp) % M;
            b = b >> 1;
        }
        return ret;
    }

    public static int find(int[] tree, int idx) {
        if (tree[idx] == idx) return idx;
        else return tree[idx] = find(tree, tree[idx]);
    }

    public static void union(int[] tree, int idx1, int idx2) {
        int root1 = find(tree, idx1);
        int root2 = find(tree, idx2);
        tree[root2] = root1;
    }

    public static int lowerBound(int[] list, int target) {
        int ok = list.length;
        int ng = -1;
        while (Math.abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (list[mid] >= target) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;
    }

    public static int lowerBound(long[] list, long target) {
        int ok = list.length;
        int ng = -1;
        while (Math.abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (list[mid] >= target) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;
    }

    public static <T extends Comparable<? super T>> int lowerBound(List<T> list, T target) {
        return ~Collections.binarySearch(list, target, (x, y) -> (x.compareTo(y) >= 0) ? 1 : -1);
    }

    public static <T extends Comparable<? super T>> int upperBound(List<T> list, T target) {
        return ~Collections.binarySearch(list, target, (x, y) -> (x.compareTo(y) > 0) ? 1 : -1);
    }
}

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

class BIT<T> {
    int n;
    ArrayList<T> bit;
    BiFunction<T, T, T> bif;

    /**
     * 1-indexed なBinary Indexed Treeを構築する
     *
     * @param n   容量
     * @param bif 適用させる関数
     * @param sup 初期値
     */
    BIT(int n, BiFunction<T, T, T> bif, Supplier<T> sup) {
        this.n = n;
        bit = new ArrayList<>(n + 1);
        for (int i = 0; i < n + 1; ++i) {
            bit.add(sup.get());
        }
        this.bif = bif;
    }

    /**
     * iの位置の値をvで更新する
     *
     * @param i index
     * @param v 新しい値
     */
    void set(int i, T v) {
        for (int x = i; x <= n; x += x & -x) {
            bit.set(x, bif.apply(bit.get(x), v));
        }
    }

    /**
     * クエリー
     *
     * @param defaultValue 初期値
     * @param i            index
     * @return [1, i]までfを適用した結果
     */
    T reduce(T defaultValue, int i) {
        T ret = defaultValue;
        for (int x = i; x > 0; x -= x & -x) {
            ret = bif.apply(ret, bit.get(x));
        }
        return ret;
    }
}

class SegmentTree<T> {
    int n;
    ArrayList<T> dat;
    BiFunction<T, T, T> bif;
    Supplier<T> sup;

    /**
     * 0-indexed なSegment Treeを構築する
     *
     * @param n_  要求容量
     * @param bif 適用させる関数
     * @param sup 初期値
     */
    SegmentTree(int n_, BiFunction<T, T, T> bif, Supplier<T> sup) {
        n = 1;
        while (n < n_) n *= 2;

        dat = new ArrayList<>(2 * n - 1);
        for (int i = 0; i < 2 * n - 1; ++i) {
            dat.add(sup.get());
        }
        this.bif = bif;
        this.sup = sup;
    }

    /**
     * kの位置の値をvで更新する
     *
     * @param k index
     * @param v 新しい値
     */
    void set(int k, T v) {
        k += n - 1;
        dat.set(k, v);
        while (k > 0) {
            k = (k - 1) / 2;
            dat.set(k, bif.apply(dat.get(k * 2 + 1), dat.get(k * 2 + 2)));
        }
    }

    /**
     * クエリー
     *
     * @param l はじめ
     * @param r おわり
     * @return [l, r)での演算bifを適用した結果を返す
     */
    T reduce(int l, int r) {
        return _reduce(l, r, 0, 0, n);
    }

    T _reduce(int a, int b, int k, int l, int r) {
        if (r <= a || b <= l) return sup.get();
        if (a <= l && r <= b) return dat.get(k);
        T vl = _reduce(a, b, k * 2 + 1, l, (l + r) / 2);
        T vr = _reduce(a, b, k * 2 + 2, (l + r) / 2, r);
        return bif.apply(vl, vr);
    }
}

class UnionFind {
    int[] par;

    UnionFind(int n) {
        par = new int[n];
        for (int i = 0; i < n; ++i) {
            par[i] = i;
        }
    }

    int find(int x) {
        if (par[x] == x) {
            return x;
        }
        return par[x] = find(par[x]);
    }

    boolean same(int x, int y) {
        return find(x) == find(y);
    }

    void union(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) {
            return;
        }
        par[x] = y;
    }
}


import java.util.*;

class Main{
    public static void main(String[] args){
        // 入力受付
        Scanner sc = new Scanner(System.in);    //scanner
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int D = sc.nextInt();

        // バトル
        while(true){
            // 高橋くんの攻撃
            C-=B;
            if(C<0){
                System.out.println("Yes");
                break;
            }
            // 青木くんの攻撃
            A-=D;
            if(A<0){
                System.out.println("No");
                break;
            }
        }
    }
}


import java.util.*;

class Main{
    public static void main(String[] args){
        // 入力受付
        Scanner sc = new Scanner(System.in);    //scanner
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int D = sc.nextInt();

        // バトル
        while(true){
            // 高橋くんの攻撃
            C-=B;
            if(C<0){
                System.out.println("Yes");
            }
            // 青木くんの攻撃
            A-=D;
            if(A<0){
                System.out.println("No");
                break;
            }
        }
    }
}


import java.util.*;

class Main{
    public static void main(String[] args){
        // 入力受付
        Scanner sc = new Scanner(System.in);    //scanner
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int D = sc.nextInt();

        // 計算
        if( (A+D-1)/D >= (C+B-1)/B)
            System.out.println("Yes");
        else
            System.out.println("Yes");
    }
}


#define FOR(i, a, b) for(int i=a; i<b; i++)
#include<cstdio>
#include<algorithm>
#include<utility>
#include<string>
#include<cstdlib>

int main(){
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);

    while(true){
        c -= b;
        if(c<=0){
            printf("Yes\n");
            break;
        }
        a -= d;
        if(a<=0){
            printf("No\n");
            break;
        }
    }

    return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
int main(void){
	int a,b,c,d,T,A;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	T=c/b;
	A=a/d;
	if(c%b!=0){
		T++;
	}
	if(a%d!=0){
		A++;
	}
	if(T<=A){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}
	return 0;
}


#include<stdio.h>
int main()
{
    int a,b,c,d,turn = 0;
    scanf("%d %d %d %d",&a,&b,&c,&d);
    while(1)
    {
        turn++;
        if(turn%2!=0) //odd-taka attacks
            c = c-b;
        else //even - ako attacks
            a = a-d;
        if(a<=0 || c<=0)
            break;
    }
    if(a>=c)puts("Yes");
    else puts("No");
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int tpoints=0,apoints=0;
    if(a<c){
        apoints++;
    }
    else if(a>c){
        tpoints++;
    }
    if(b<d){
        apoints++;
    }
    else if(b>d){
        tpoints++;
    }
    if(tpoints>=apoints){
        cout<<"Yes";
    }
    else{
        cout<<"No";
    }
    return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    if(a+b < c+d){
        cout<<"No";
    }
    else{
        cout<<"Yes";
    }

    return 0;
}


#include <bits/stdc++.h>
const long long MOD = 1e9+7;
using namespace std;
#define ll long long
#define ar array

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

	int a,b,c,d;
	cin >> a >> b >> c >> d;

	if ((b-c)>(d-a)) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}
	return 0;
}


#include<stdio.h>
int main(void){
  int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  while(1){
    c-=b;
    if(c<=0){printf("Yes");
             return 0;
            }
    a-=d;
    if(a<=0){printf("No");
            return 0;
           }
  }
  return 0;
}


#include <stdio.h>

int main(void) {
    int A, B, C, D, b;
    scanf("%d%d%d%d", &A, &B, &C, &D);
    while (1) {
        C-=B;
        if (C<=0) {
            b=1;
            break;
        }
        A-=D;
        if (A<=0) {
            b=0;
            break;
        }
    }
    if (b) printf("Yes");
    else printf("No");
    return 0;
}


#include <stdio.h>

int main(void){
    int a,b,c,d;
    scanf("%d %d %d %d",&a,&b,&c,&d);
    while(a>0 || c>0){
        c-=b;
        if(c<=0){
            break;
        }
        a-=d;
    }
    if(a>0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    return 0;
}


#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<time.h>
#define FOR(i,n) for(int i=0;i<n;i++)
#define PRN(n) printf("%d\n",n)
#define PRF(n) printf("%lf\n",n)
#define PRL(n) printf("%lld\n",n)
#define PRS(s) printf("%s\n",s)
#define PRC(c) printf("%c",c)
#define INI(n) scanf("%d",&n)
#define INL(n) scanf("%lld",&n)
#define INF 10000000000
#define mod 1000000007
#define X 100000
#define N 20
#define M 46
typedef long long int ll;
ll finv[X];
ll fac[X];
ll inv[X];
ll usort(const void *a, const void *b){return *(ll*)a-*(ll*)b;}
ll dsort(const void *a, const void *b){return *(ll*)b-*(ll*)a;}
ll ssort(const void *a, const void *b){return strcmp((char*)a,(char*)b);}
void Iswap(int *a,int *b){
  int t=*a;
  *a=*b;
  *b=t;
}
void Fswap(double *a,double *b){
  double t=*a;
  *a=*b;
  *b=t;
}
void Lswap(ll *a,ll *b){
  ll t=*a;
  *a=*b;
  *b=t;
}
ll min(ll a,ll b){
  if(a>b)return b;
  return a;
}
ll max(ll a,ll b){
  if(a>b)return a;
  return b;
}
ll z(ll a){return max(a,-a);}
ll gcd(ll a,ll b){if(!b){return a;}else{return gcd(b,a%b);}}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
ll kt(ll a){
  ll sum=0;
  while(a){
    a/=10;
    sum++;
  }
  return sum;
}
ll ks(ll a){
  ll sum=0;
  while(a){
    sum+=a%10;
    a/=10;
  }
  return sum;
}
void nCrReady(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for (ll i=2;i<X;i++){
    fac[i]=fac[i-1]*i%mod;
    inv[i]=mod-inv[mod%i]*(mod/i)%mod;
    finv[i]=finv[i-1]*inv[i]%mod;
  }
}
ll nCr(ll n,ll k){return fac[n]*(finv[k]*finv[n-k]%mod)%mod;}
ll modpow(ll a,ll n){
  ll res=1;
  while(n>0){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}
int main(void){
  int a[4];
  FOR(i,4)INI(a[i]);
  char s[2][4]={"Yes","No"};
  PRS(s[a[0]/a[3]<a[2]/a[1]]);
  return 0;
}


#include <stdio.h>

struct st_pokemon //モンスターのステータス用構造体(体力・攻撃力)
{
	int hp;
	int attack;
};

void main(void)
{
	struct st_pokemon takahashi;
	struct st_pokemon aoki;
	int hp_judge	        = 0;
	int attack_judge 		= 0;
    int result				= 0;

	scanf( "%d %d %d %d", &takahashi.hp , &takahashi.attack , &aoki.hp , &aoki.attack );

	hp_judge            = takahashi.hp - aoki.hp;
  	attack_judge		= takahashi.attack - aoki.attack;

    result				= attack_judge / hp_judge ;

	if( result >= 0 )
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}

 	return;
}


#include <stdio.h>

int takahashi_attack(int hp, int at)
{
    int remain_hp;
    remain_hp = hp - at;
    return remain_hp;
}

int aoki_attack(int hp, int at)
{
    int remain_hp;
    remain_hp = hp - at;
    return remain_hp;
}

int main(void)
{
    int A, B, C, D;
    int aoki_remain;
    int takahashi_remain;

    scanf("%d %d %d %d", &A, &B, &C, &D);
    while (1)
    {
        aoki_remain = takahashi_attack(C, B);
        C = aoki_remain;
        printf("aoki_remain:%d\n", aoki_remain);
        if (aoki_remain == 0)
        {
            printf("Yes\n");
            break;
        }
        takahashi_remain = aoki_attack(A, D);
        A = takahashi_remain;
        printf("takahashi_remain:%d\n", takahashi_remain);
        if (takahashi_remain == 0)
        {
            printf("No\n");
            break;
        }
    }
    return 0;
}


function Main(input) {
	input = input.split(" ");
	var tHP = parseInt(input[0], 10);
	var tAT = parseInt(input[1], 10);
	var aHP = parseInt(input[2], 10);
	var aAT = parseInt(input[3], 10);

var a =  Math.ceil(aHP  /  tAT )

var t =  Math.ceil(tHP  /  aAT )

if (t >= a){
	console.log('Yes');
}else{
	console.log('No');

}

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


const Main = input => {
  const sp = input.split(' ').map(e => Number(e));

  const a = Math.ceil( sp[2] / sp[1] );
  const b = Math.ceil( sp[0] / sp[3] );

  const resultA = sp[0] - sp[3]*b;
  const resultB = sp[2] - sp[1]*a;

  console.log(a <= b ? 'Yes' : 'No');
};

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//Main(`10 9 10 10`);
//Main(`45 4 39 5`)


// inputに入力データ全体が入る
function Main(input) {
	var ans
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.trim().split("\n");
	s = input[0].split(' ').map((n) => (parseInt(n)))
	while (true) {
		s[2] = s[2] - s[1]
		if (s[2] <= 0 ) {
			ans = 'Yes'
			break;
		}
		s[0] = s[0] - s[3]
		if (s[0] <= 0 ) {
			ans = 'No'
			break;
		}
	}

	//出力
	console.log(ans)
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main(require('fs').readFileSync('./input.txt', 'utf-8'));


import java.util.*;
 public class Main {
	public static void main(String[] args){
      int A = 100;
      int B = 10;
      int C = 100;
      int D = 9;

      float E = A / D;
      float F = C / B;

      if(E > F){
         System.out.println("Yes");
      }else{
         System.out.println("No");
      }
   }
 }


function Main(input) {
	var str = input;
	str = str.split("\n")[0];
    str = str.split(' ');
    var thp = Number(str[0]);
    var tpw = Number(str[1]);
    var ahp = Number(str[2]);
    var apw = Number(str[3]);
    while(thp > 0 && ahp > 0 ){
   		ahp = ahp - tpw;
   		if(ahp <=0){
   			console.log("Yes");
   			break;
   		}
   		thp = thp - tpw;
   		if(thp <=0){
   			console.log("No");
   			break;
   		}
    }
}
 //*おまじない
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
	var str = input;
	str = str.split("\n")[0];
    str = str.split(' ');
    console.log(str);
    var thp = Number(str[0]);
    var tpw = Number(str[1]);
    var ahp = Number(str[2]);
    var apw = Number(str[3]);
    while(thp > 0 && ahp > 0 ){
   		ahp = ahp - tpw;
   		if(ahp <=0){
   			console.log("Yes");
   			break;
   		}
   		thp = thp - tpw;
   		if(thp <=0){
   			console.log("No");
   			break;
   		}
    }
}
 //*おまじない
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import(
	"fmt"
)

var a, b, c, d int

func main() {
	fmt.Scan(&a, &b, &c, &d)

	for true {
		c -= b
		if c <= 0 {
			fmt.Println("Yes");
			return
		}
		a -= d
		if a <= 0 {
			fmt.Println("No");
			return
		}
	}
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

const initBufSize, maxBufSize = 10000, 1000000

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 nextInts(n int) []int {
	res := make([]int, n)
	for i := range res {
		res[i] = nextInt()
	}
	return res
}

func min(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton min() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Min(float64(res), float64(nums[i])))
	}
	return res
}

func max(nums ...int) int {
	if len(nums) == 0 {
		panic("funciton max() requires at least one argument.")
	}
	res := nums[0]
	for i := 0; i < len(nums); i++ {
		res = int(math.Max(float64(res), float64(nums[i])))
	}
	return res
}

func abs(n int) int {
	return int(math.Abs(float64(n)))
}

func pow(r, n int) int {
	return int(math.Pow(float64(r), float64(n)))
}

func attackCount(hp, at int) int {
	count := math.Ceil(float64(hp) / float64(at))
	return int(count)
}

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, initBufSize), maxBufSize)
	hpTakahashi := nextInt()
	atTakahashi := nextInt()
	hpAoki := nextInt()
	atAoki := nextInt()

	//相手を倒すまでの攻撃回数
	countTakahashi := attackCount(hpAoki, atTakahashi)
	countAoki := attackCount(hpTakahashi, atAoki)

	if countTakahashi <= countAoki {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

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

func main() {
	In := ReadLineInt()
	TakahashiHP, TakahashiAttack := In[0], In[1]
	AokiHP, AokiAttack := In[2], In[3]

	for {
		AokiHP -= TakahashiAttack

		if AokiHP <= 0 {
			fmt.Println("Yes")
			return
		}

		TakahashiHP -= AokiAttack

		if TakahashiHP <= 0 {
			fmt.Println("No")
			return
		}
	}
}

/////////////////////////////////////////

func fln(format string, elements ...interface{}) {
	fmt.Printf(format+"\n", elements...)
}

var BufReader = bufio.NewReaderSize(os.Stdin, 1e6)

func ReadLine() string {
	a, _, _ := BufReader.ReadLine()
	return string(a)
}

func ReadLineInt() (result []int) {
	in := strings.Split(ReadLine(), " ")
	result = make([]int, 0, 2)
	for _, v := range in {
		t, _ := strconv.Atoi(v)
		result = append(result, t)
	}
	return
}


package main

import "fmt"

func main() {
	var a, b, c, d int
	fmt.Scan(&a, &b, &c, &d)
	if (a+d-1)/d <= (c+b-1)/b {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}


package main

import "fmt"

var a, b, c, d int
func main() {
	fmt.Scan(&a)
	fmt.Scan(&b)
	fmt.Scan(&c)
	fmt.Scan(&d)
	if a / d < c / b {
		fmt.Println("No")
	} else {
		fmt.Println("Yes")
	}
}


package main

import "fmt"

func main() {
	var taka_hp, taka_atc, aoki_hp, aoki_atc int
	fmt.Scan(&taka_hp, &taka_atc, &aoki_hp, &aoki_atc)

	aoki_win_count := (taka_hp+aoki_atc-1) / aoki_hp
	taka_win_count := (aoki_hp+taka_atc-1) / taka_atc
	if aoki_win_count >= taka_win_count{
		fmt.Println("Yes")
	}else{
		fmt.Println("No")
	}

}


input = gets.split.map(&:to_i)
takahashi_hp = input[0]
takahashi_atk = input[1]
aoki_hp = input[2]
aoki_atk = input[3]

is_takahashi_next = true

while(takahashi_hp > 0 && aoki_hp > 0) do
  if is_takahashi_next
    is_takahashi_next = !is_takahashi_next
    aoki_hp -= takahashi_atk
    next
  else
    is_takahashi_next = !is_takahashi_next
    takahashi_hp -= aoki_atk
    next
  end
end

puts takahashi_hp <= 0 ? 'No' : 'Yes'


a, b, c, d = gets.split.map(&:to_i)
while a > 0 || c > 0 do
  c -= b
  break if c <= 0
  a -= d
  break if a <= 0
end
puts c <= 0 ? "Yes" : "No"


def count(hp,bp)
  if(hp%bp!=0)
    return hp/bp+1
  end
  return hp/bp
end

A,B,C,D = gets.split()
if(count(A.to_i(),D.to_i())>=count(C.to_i(),B.to_i()))
  puts('Yes')
else
  puts('No')
end


a,b,c,d=gets.split.map(&:to_i)
loop do
  c-=a
  break if c<=0
  a-=d
  break if a<=0
end
puts c<=0?'Yes':'No'


a,b,c,d=gets.split.map(&:to_i)
loop do
  c-=a
  break if c<0
  a-=d
  break if a<0
end
puts c<0?'Yes':'No'


a, b, c, d = gets.split.map(&:to_i)

takahashi_turn = (c%b == 0 ? c/b : c/b + 1)
aoki_turn = (a%d == 0? a/d : a/d + 1)

if takahashi_turn >= aoki_turn
  puts "Yes"
else
  puts "No"
end


use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let a: isize = iterator.next().unwrap().parse().unwrap();
    let b: isize = iterator.next().unwrap().parse().unwrap();
    let c: isize = iterator.next().unwrap().parse().unwrap();
    let d: isize = iterator.next().unwrap().parse().unwrap();

    let t1 = (c + b - 1) / b;
    let t2 = (a + d - 1) / d;

    return if t1 <= t2 {
        "Yes".to_string()
    } else {
        "No".to_string()
    }
}


#![allow(unused_imports)]
#![allow(unused_macros)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_mut)]
#![allow(unused_assignments)]
use proconio::input;
use proconio::marker::Usize1;
use std::collections::*;
use std::cmp::*;
use std::f64::consts::*;

const MOD: u64 = 1000000007;
const INF: usize = std::usize::MAX / 4;

fn main() {
    input! {
        mut A: i64,
        mut B: i64,
        mut C: i64,
        mut D: i64,
    }

    for i in 0..1000 {
        if i % 2 == 0 {
            C -= B;
            if C <= 0 {
                println!("Yes");
                break;
            }
        } else {
            A -= D;
            if A <= 0 {
                println!("No");
                break;
            }
        }
    }
}


use proconio::{input, fastout};

#[fastout]
fn main() {
  input! {
    mut a: isize,
    b: isize,
    mut c: isize,
    d: isize,
  }

  let mut turn: isize = 0;
  while (a > 0) & (c > 0) {
    if turn % 2 == 0 {
      c -= b;
    }
    else {
      a -= d;
    }
    turn += 1;
  }

  let ans = if c <= 0 {"Yes"} else {"No"};
  println!("{}", ans);
}


#[allow(unused_imports)]
use proconio::{fastout, input, marker::*};

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

    let x = c / b + c % b;
    let y = a / d + a % d;

    if x <= y {
        println!("Yes");
    } else {
        println!("No");
    }
}


use proconio::{input, fastout};

#[fastout]
fn main() {
    input! {
        mut a: i64,
        b: i64,
        mut c: i64,
        d: i64,
    }

    while a > 0 && c > 0 {
        c -= b;
        a -= d;
    }

    if a <= 0 && c <= 0 {
        println!("Yes");
    } else if a <= 0 {
        println!("No")
    } else {
        println!("No")
    }
}


use proconio::{input, fastout};

#[fastout]
fn main() {
    input! {
        mut a: i64,
        b: i64,
        mut c: i64,
        d: i64,
    }

    while a > 0 && c > 0 {
        a -= d;
        c -= b
    }

    if a <= 0 && c <= 0 {
        println!("Yes");
    } else if a <= 0 {
        println!("No")
    } else {
        println!("No")
    }
}


let abcd = readLine()!.split(separator: " ").map { Int($0)! }
let (a, b, c, d) = (abcd[0], abcd[1], abcd[2], abcd[3])

var v0 = c / b
if c % b != 0 { v0 += 1 }
var v1 = a / d
if a % d != 0 { v1 += 1 }

if v0 <= v1 {
  print("Yes")
} else {
  print("No")
}


let line = readLine()!
let abcd = line.split(separator: " ").map { Int($0)! }
var a = abcd[0]; var b = abcd[1]; var c = abcd[2]; var d = abcd[3]

while true {
  c -= b
  if c <= 0 {
    print("Yes")
    break
  }
  a -= d
  if a <= 0 {
    print("No")
    break
  }
}


let inputs = readLine()!.split(separator: " ").map { Int($0)! }
var (A, B, C, D) = (inputs[0], inputs[1], inputs[2], inputs[3])

while true {
    C -= B
    if C <= 0 {
        break
    }

    A -= D
    if A <= 0 {
        break
    }
}

print(A <= 0 ? "No" : "Yes")


import Foundation
let input = readLine()!.split(separator: " ").map({ Int($0)! })
print(input[0]-input[3]>input[2]-input[1] ? "Yes":"No")


let abcd = readLine()!.split(separator: " ").map { Int($0)! }
let (a, b, c, d) = (abcd[0], abcd[1], abcd[2], abcd[3])

if (Double(c) / Double(b)).rounded(.up) <= (Double(a) / Double(d)).rounded(.up) {
  print("Yes")
} else {
  print("No")
}


let num = readLine()!.split(separator: " ").compactMap{Int($0)}

    let a = num[3] - num[1]

    let b = num[0] - num[2]

    if a > b {
      print("No")
    } else {
      print("Yes")
    }


import * as fs from 'fs';

namespace AtCoder.abc001 {

    export class Program {

        constructor(private readonly args: string[][]) {
        }

        /**
         * in
         *
         * out
         *
         */
        main(this: Program): void {
            let [a, b, c, d]: number[] = this.args[0].map(Number);

            while (a > 0 || c > 0) {

                c -= b;
                if (c <= 0) {
                    console.log('Yes');
                    break;
                }

                a -= d;

                if (a <= 0) {
                    console.log('No');
                    break;
                }

            }

        }
    }
}

const args: string[][] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n').map(r => r.split(' '));
const prg: AtCoder.abc001.Program = new AtCoder.abc001.Program(args);
prg.main();


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"));


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')


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')


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')


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')


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))


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)


a, b = map(int, input().split())
unused = 1
ans = 0
while unused < b:
  unused += (a-1)
  ans += 1
print(ans)


N,K = map(int,input().split())
c = N
ans = 1
while c < K:
    ans += 1
    c += N-1
print(ans)


a,b=list(map(int,input().split()))
print((b-1)//(a-1))


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)


		//						package Dynamic;
import java.io.*;
import java.util.*;
public class Main{
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static StringTokenizer st;
    static public void main(String[] args)throws IOException{
    	st=new StringTokenizer(br.readLine());
    	int a=i();
    	int b=i();
    	if(b==1)	pl(0);
    	else if(a>=b)	pl(1);
    	else
    	{
    		int c=1;
    		int k=a;
    		while(k<b)
    		{
    			k+=(a-1);
    			c++;

    		}
    		pl(c);
    		//pl(k);
    	}
    }
    static int i()throws IOException
    {
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	return Integer.parseInt(st.nextToken());
    }
    static long l()throws IOException
    {
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	return Long.parseLong(st.nextToken());
    }
    static String s()throws IOException
    {
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	return st.nextToken();
    }
    static double d()throws IOException
    {
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	return Double.parseDouble(st.nextToken());
    }
    static void p(String p)
    {
    	System.out.print(p);
    }
    static void p(int p)
    {
    	System.out.print(p);
    }
    static void p(double p)
    {
    	System.out.print(p);
    }
    static void p(long p)
    {
    	System.out.print(p);
    }
    static void p(char p)
    {
    	System.out.print(p);
    }
    static void p(boolean p)
    {
    	System.out.print(p);
    }
    static void pl(String pl)
    {
    	System.out.println(pl);
    }
    static void pl(int pl)
    {
    	System.out.println(pl);
    }
    static void pl(char pl)
    {
    	System.out.println(pl);
    }
    static void pl(double pl)
    {
    	System.out.println(pl);
    }
    static void pl(long pl)
    {
    	System.out.println(pl);
    }
    static void pl(boolean pl)
    {
    	System.out.println(pl);
    }
    static void pl()
    {
    	System.out.println();
    }
    static int[] ari(int n)throws IOException
    {
    	int ar[]=new int[n];
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	for(int x=0;x<n;x++)
    		ar[x]=i();
    	return ar;
    }
    static long[] arl(int n)throws IOException
    {
    	long ar[]=new long[n];
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	for(int x=0;x<n;x++)
    		ar[x]=l();
    	return ar;
    }
    static String[] ars(int n)throws IOException
    {
    	String ar[]=new String[n];
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	for(int x=0;x<n;x++)
    		ar[x]=s();
    	return ar;
    }
    static double[] ard(int n)throws IOException
    {
    	double ar[]=new double[n];
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	for(int x=0;x<n;x++)
    		ar[x]=d();
    	return ar;
    }
    static char[] arc(int n)throws IOException
    {
    	char ar[]=new char[n];
    	if(!st.hasMoreTokens())
    		st=new StringTokenizer(br.readLine());
    	for(int x=0;x<n;x++)
    		ar[x]=st.nextToken().charAt(0);
    	return ar;
    }
    static void pari(int ar[])
    {
    	for(int a:ar)
    		System.out.print(a+" ");
    }
    static void parl(long ar[])
    {
    	for(long a:ar)
    		System.out.print(a+" ");
    }
    static void pars(String ar[])
    {
    	for(String a:ar)
    		System.out.print(a+" ");
    }
    static void pard(double ar[])
    {
    	for(double a:ar)
    		System.out.print(a+" ");
    }
    static void parc(char ar[])
    {
    	for(char a:ar)
    		System.out.print(a+" ");
    }
}
class ar implements Comparable<ar>
{
	int ar[]=new int[2];
	ar(int arr[])
	{
		ar[0]=arr[0];
		ar[1]=arr[1];
	}
	public int compareTo(ar o)
	{
		return this.ar[0]>o.ar[0]?1:this.ar[0]==o.ar[0]?0:-1;
	}
}


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


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


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


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


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


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


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


/*
#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;
}


/*
    -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;

}