#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
struct node
{
double x,a,l,r;
}nn[1005];
int n;
double t;
bool cmp(const node &n1,const node &n2)
{
return n1.x<n2.x;
}
int main()
{
scanf("%d%lf",&n,&t);
for(int i=0;i<n;i++)
{
scanf("%lf%lf",&nn[i].x,&nn[i].a);
nn[i].l=nn[i].x-nn[i].a/2;
nn[i].r=nn[i].x+nn[i].a/2;
}
sort(nn,nn+n,cmp);
int ans=2;
for(int i=1;i<n;i++)
{
double tmp=nn[i].l-nn[i-1].r;
if(tmp>t)
ans+=2;
else if(tmp==t)
ans++;
}
printf("%d\n",ans);
return 0;
}