Vasya has recently got a job as a cashier at a local store. His day at work is L minutes long. Vasya has already memorized n regular customers, the i-th of which comes after t_{i} minutes after the beginning of the day, and his service consumes l_{i} minutes. It is guaranteed that no customer will arrive while Vasya is servicing another customer. 

Vasya is a bit lazy, so he likes taking smoke breaks for a minutes each. Those breaks may go one after another, but Vasya must be present at work during all the time periods he must serve regular customers, otherwise one of them may alert his boss. What is the maximum number of breaks Vasya can take during the day?

Input

The first line contains three integers n, L and a (0 ≤ n ≤ 10^{5}, 1 ≤ L ≤ 10^{9}, 1 ≤ a ≤ L).

The i-th of the next n lines contains two integers t_{i} and l_{i} (0 ≤ t_{i} ≤ L - 1, 1 ≤ l_{i} ≤ L). It is guaranteed that t_{i} + l_{i} ≤ t_{i + 1} and t_{n} + l_{n} ≤ L.

Output

Output one integer — the maximum number of breaks.

Examples

Input

2 11 3
0 1
1 1


Output

3

Input

0 5 2


Output

2

Input

1 3 2
1 2


Output

0

Note

In the first sample Vasya can take 3 breaks starting after 2, 5 and 8 minutes after the beginning of the day.

In the second sample Vasya can take 2 breaks starting after 0 and 2 minutes after the beginning of the day.

In the third sample Vasya can't take any breaks.
"""
from time import*
import random
money = 10000
cheat = input("Enter Cheat code if you know it: ")
if cheat == "SAHAR":
	money += 100000
	print("--Your balans 110000rub--")
print("You have",str(money)+"rub")
ques = input("Magazines or VulkanKazino or 1xbet:")
if ques == "1xbet":
	stavki = int(input("How many stavka you want?"))
	for i in range(stavki):
		stav = input("Input your color! :")
		mon = int(input("Money :"))
		sides = ["black","black","black","red","red","green"]
		money -= mon
		die_1 = random.choice(sides)
		if die_1 == stav:
			if stav == "black":
				money += mon*2
				print("YOU WIN")
				print("You have %.1f rub" %money)
				print()
			if stav == "red":
				money += mon*3
				print("YOU WIN")
				print("You have %.1f rub" %money)
				print()
			if stav == "green":
				money += mon*5
				print("YOU WIN")
				print("You have %.1f rub" %money)
				print()
		else:
			money +=0
			print("YOU LOSE")
			print("You have %.1f rub" %money)
elif ques == "VulkanKazino":
	
	
	pass
#####################################
s = int(input("Choise: CS:GO market = 1 , M.video = 2 , Kayhon = 3   :"))
if s == 1:
	print("----Welcome----")
	while 1:
		print("You have %.1f rub in your Wallet" %money)
		mag = int(input("Choise: 1) M4A1 -> Howl = 50000rub  ,2) AWP -> Afrikan = 50rub  ,3) ak47 -> Firesnake = 10000rub  ,4) Karambit -> ulraviolet = 20000rub   ,5) USP-S-> Kings = 100rub , 0)EXIT from magazine:"))
		if mag == 1:
			if money - 50000 < 0:
				print("Sorry you don't have a money((")
				break
			else:
				money -= 50000
				print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				print()				
		elif mag == 2:
			if money - 50 < 0:
				print("Sorry you don't have a money((")
				break
			else:
				money -= 50
				print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
		elif mag == 3:
			if money - 10000 < 0:
				print("Sorry you don't have a money((")
				break
			else:
				money -= 10000
				print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
		
		elif mag == 4:
			if money - 20000 < 0:
				print("Sorry you don't have a money((")
				break
			else:
				money -= 20000
				print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
		elif mag == 5:
			if money - 100 < 0:
				print("Sorry you don't have a money((")
				break
			else:
				money -= 100
				print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
			if mag == 0:
				break
#######################################################################################
elif s == 2:
	print("------------------------------------------------------Welcome to M.video--------------------------------------------------")
	while 1:
		print("You have %.1f rub in your Wallet" %money)
		mag1 = int(input("notebooks = 1 , PC = 2 , Game Series PC = 3 , telephones = 4, Exit = 0"))
		if mag1==0:
			break
		if mag1 == 1:
			notebook = int(input("Lenovo ideapad310 : 35000rub = 1 , HP jet black : 30000rub = 2 , fujitsu : 20000rub = 3"))
			################################################################################################################
			if notebook == 1:
				lenovo = int(input("Buy = 1 , Show characters = 2"))
				if lenovo ==  1:
					if money - 35000 < 0:
						print("Sorry you don't have a money((")
						break
					else:
						money -= 35000
						print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				else:
					print("Color: Silver","\n","RAM:12gb","\n","ROM:1TB","\n","VideoCard:Nvidia Geforce 930MX and intelHDgraphics9700")
					povt = int(input("Do you want to buy it?: YES = 1 , NO = 2"))
					if povt == 1:
						if money - 35000 < 0:
							print("Sorry you don't have a money((")
							break
						else:
							money -= 35000
							print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
			####################################################################################
			if notebook == 2:
				hp = int(input("Buy = 1 , Show characters = 2"))
				if hp ==  1:
					if money - 30000 < 0:
						print("Sorry you don't have a money((")
						break
					else:
						money -= 30000
						print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				else:
					print("Color: Black","\n","RAM:8gb","\n","ROM:1TB","\n","VideoCard:AMD HD Graphics8100")
					povt = int(input("Do you want to buy it?: YES = 1 , NO = 2"))
					if povt == 1:
						if money - 30000 < 0:
							print("Sorry you don't have a money((")
							break
						else:
							money -= 30000
							print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
			######################################################################################
			if notebook == 3:
				fujit = int(input("Buy = 1 , Show characters = 2"))
				if fujit == 1:
					if money - 20000 < 0:
						print("Sorry you don't have a money((")
						break
					else:
						money -= 20000
						print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				else:
					print("Color: Black","\n","RAM:4gb","\n","ROM:500GB","\n","VideoCard:IntelHD graphics3500")
					povt = int(input("Do you want to buy it?: YES = 1 , NO = 2"))
					if povt == 1:
						if money - 20000 < 0:
							print("Sorry you don't have a money((")
							break
						else:
							money -= 20000
							print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				
		if mag1 == 2:
			pc = int(input("1) DELL = 100000 , 2)ASUS = 60000 , 3)Apple = 500000 , 4)Lenovo = 300000"))
			############################################################################################
			if pc == 1:
				pc = int(input("Buy = 1 , Show characters = 2"))
				if pc ==  1:
					if money - 100000 < 0:
						print("Sorry you don't have a money((")
						break
					else:
						money -= 100000
						print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
				else:
					print("Color: black","\n","RAM:32gb","\n","ROM:2TB","\n","VideoCard:Nvidia Geforce GTX 1070TI")
					povt = int(input("Do you want to buy it?: YES = 1 , NO = 2"))
					if povt == 1:
						if money - 100000 < 0:
							print("Sorry you don't have a money((")
							break
						else:
							money -= 100000
							print("Tranzation succesfull, you have %.1f rub in your wallet"%money)
"""
"""
n=int(input())
while n>5:
    n = n - 4
    s=n%2
    n=(n-s)/2
if n==1:
	print('Sheldon')
if n==2:
	print('Leonard')
if n==3:
	print('Penny') 
if n==4:
	print('Rajesh')
if n==5:print('Howard')
"""
n,l,a=map(int,input().split())
ans=0
if n>0:
    lt,ltt=0,0
    
    for i in range(n):
        t,tt=map(int,input().split())
        ans+=(t-(lt+ltt))//a
        lt,ltt=t,tt
    ans+=(l-(lt+ltt))//a
else:
    ans+=l//a

print(ans)
