#include <stdio.h>
#include <assert.h>
#define N_MAX (100000)
#define min(a,b) (((a)<(b))?(a):(b))
typedef struct {
	int pos,value;
} Info;

signed main(){
	long long damage_total[N_MAX]={};
	Info deque[N_MAX];
	int head=0,tail=0;
	int N,H;
	long long answer = 0;

	scanf("%d%d",&N,&H);	
	int currentHP = H;
	for(int i = 0 ; i < N-1 ; i++){
		int d,h;
		scanf("%d%d",&d,&h);
		while( head != tail && deque[tail-1].value <= h ) tail--;

		deque[tail++] = (Info){i,h};
		while( head != tail ){
			long long maximumRecover = H - (damage_total[i] - damage_total[deque[head].pos]);
			if( maximumRecover > 0 ) break;
			head++;
		}

		for(int j = head ; j < tail && currentHP <= d ; j++){
			// ????????§???????????§????????????
			int maximumRecover = H - (damage_total[i] - damage_total[deque[j].pos]);
			// ??¨???????????§????????????????£???°???
			if( maximumRecover <= currentHP) continue;

			// j??????????????§?????????????????? needRecover ????¨????
			int needRecover = min( maximumRecover - currentHP , d - currentHP + 1);  
			// ???????????? needRecover ?????????????????????????????° useCount ????±????????????????????????????
			int useCount = (needRecover+deque[j].value-1) / deque[j].value - 1;
			answer += useCount;
			currentHP += useCount*deque[j].value;

			// ???j?????????????????§????°???????????????????j????????£?????´?????¨???j+1????????£?????´?????????????????????j+1????????£????????????????????????j?????????????????????
			// ??¨) ???????????¶???????????\??£?????????????????¨???????????? currentHP > d ???????????????
			if( j+1 ==  tail || maximumRecover > currentHP + deque[j+1].value ){
				currentHP = min(currentHP+deque[j].value,maximumRecover);
				answer++;
			}
		}
		currentHP -= d;
		damage_total[i+1] = damage_total[i] + d;
	}
	printf("%lld\n",answer);

}