Little Susie listens to fairy tales before bed every day. Today's fairy tale was about wood cutters and the little girl immediately started imagining the choppers cutting wood. She imagined the situation that is described below.

There are *n* trees located along the road at points with coordinates *x*<sub class="lower-index">1</sub>, *x*<sub class="lower-index">2</sub>, ..., *x*<sub class="lower-index">*n*</sub>. Each tree has its height *h*<sub class="lower-index">*i*</sub>. Woodcutters can cut down a tree and fell it to the left or to the right. After that it occupies one of the segments [*x*<sub class="lower-index">*i*</sub> - *h*<sub class="lower-index">*i*</sub>, *x*<sub class="lower-index">*i*</sub>] or [*x*<sub class="lower-index">*i*</sub>;*x*<sub class="lower-index">*i*</sub> + *h*<sub class="lower-index">*i*</sub>]. The tree that is not cut down occupies a single point with coordinate *x*<sub class="lower-index">*i*</sub>. Woodcutters can fell a tree if the segment to be occupied by the fallen tree doesn't contain any occupied point. The woodcutters want to process as many trees as possible, so Susie wonders, what is the maximum number of trees to fell.
The first line contains integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>) — the number of trees.

Next *n* lines contain pairs of integers *x*<sub class="lower-index">*i*</sub>, *h*<sub class="lower-index">*i*</sub> (1 ≤ *x*<sub class="lower-index">*i*</sub>, *h*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the coordinate and the height of the *і*-th tree.

The pairs are given in the order of ascending *x*<sub class="lower-index">*i*</sub>. No two trees are located at the point with the same coordinate.
﻿//WISH ME LLLLLLLLLUCK
//*blessings*
//bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng bless rng 
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <numeric>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <queue>
#include <cstdio>
#include <cstring>
#include <unordered_map>
#include <unordered_set>

#define contains(vec,a) (find(vec.begin(),vec.end(),a) != vec.end()))
#define rangei(a,b) for(int i = a;i<b;++i)
#define rangej(a,b) for(int j = a;j<b;++j)
#define range(a,b) for(int i = a;i<b;++i)
#define vi vector<int>
#define vii vector<vi>
#define viii vector<vii>
#define vll vector<long long> 
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ll long long 
#define ull unsigned long long
#define pb push_back
#define min_el(vec) *min_element(vec.begin(),vec.end())
#define max_el(vec) *max_element(vec.begin(),vec.end())

const int INF = 2147483647;
long double dINF = 1.79769e+308;
using namespace std;
bool isPrime(long long n) {
	if (n == 1)
		return false;
	if (n == 2)
		return true;
	for (long long i = 2; i <= sqrt(n); i++)
		if (n % i == 0)
			return false;
	return true;
}

struct segtreemin
{
	vi tree;
	int size;

	void init(int n)
	{
		size = 1;
		while (size < n) size *= 2;
		tree.assign(2 * size - 1, INF);
	}

	void build(vi& vec, int x, int lx, int rx)
	{
		if (rx == lx + 1)
		{
			if (lx < vec.size())
				tree[x] = vec[lx];
		}
		else
		{
			int m = (lx + rx) / 2;
			build(vec, 2 * x + 1, lx, m);
			build(vec, 2 * x + 2, m, rx);
			tree[x] = ::min(tree[2 * x + 1], tree[2 * x + 2]);
		}
	}

	void build(vi& vec)
	{
		init(vec.size());
		build(vec, 0, 0, size);
	}

	void set(int i, int v, int x, int lx, int rx)
	{
		if (rx - lx == 1)
			tree[x] = v;
		else
		{
			int m = (lx + rx) / 2;
			if (i < m)
				set(i, v, 2 * x + 1, lx, m);
			else
				set(i, v, 2 * x + 2, m, rx);
			tree[x] = std::min(tree[2 * x + 1], tree[2 * x + 2]);
		}
	}

	void set(int i, int v)
	{
		set(i, v, 0, 0, size);
	}
	ll min(int l, int r, int x, int lx, int rx)
	{
		if (lx >= r || rx <= l)
			return INF;
		if (lx >= l && rx <= r)
			return tree[x];
		int m = (lx + rx) / 2;

		ll s1 = min(l, r, 2 * x + 1, lx, m);
		ll s2 = min(l, r, 2 * x + 2, m, rx);
		return std::min(s1, s2);
	}
	ll min(int l, int r)
	{
		return min(l, r, 0, 0, size);
	}
};

struct segtreemax
{
	vi tree;
	int size;

	void init(int n)
	{
		size = 1;
		while (size < n) size *= 2;
		tree.assign(2 * size - 1, 0);
	}

	void build(vi& vec, int x, int lx, int rx)
	{
		if (rx == lx + 1)
		{
			if (lx < vec.size())
				tree[x] = vec[lx];
		}
		else
		{
			int m = (lx + rx) / 2;
			build(vec, 2 * x + 1, lx, m);
			build(vec, 2 * x + 2, m, rx);
			tree[x] = ::max(tree[2 * x + 1], tree[2 * x + 2]);
		}
	}

	void build(vi& vec)
	{
		init(vec.size());
		build(vec, 0, 0, size);
	}

	void set(int i, int v, int x, int lx, int rx)
	{
		if (rx - lx == 1)
			tree[x] = v;
		else
		{
			int m = (lx + rx) / 2;
			if (i < m)
				set(i, v, 2 * x + 1, lx, m);
			else
				set(i, v, 2 * x + 2, m, rx);
			tree[x] = std::max(tree[2 * x + 1], tree[2 * x + 2]);
		}
	}

	void set(int i, int v)
	{
		set(i, v, 0, 0, size);
	}
	ll max(int l, int r, int x, int lx, int rx)
	{
		if (lx >= r || rx <= l)
			return 0;
		if (lx >= l && rx <= r)
			return tree[x];
		int m = (lx + rx) / 2;

		ll s1 = max(l, r, 2 * x + 1, lx, m);
		ll s2 = max(l, r, 2 * x + 2, m, rx);
		return std::max(s1, s2);
	}
	ll max(int l, int r)
	{
		return max(l, r, 0, 0, size);
	}


	int first_above(int v, int x, int lx, int rx)
	{
		if (lx + 1 == rx)
			return lx;
		else
		{
			int left = tree[2 * x + 1];
			int right = tree[2 * x + 2];
			int m = (lx + rx) / 2;
			if (left >= v)
				return first_above(v, 2 * x + 1, lx, m);
			if (right >= v)
				return first_above(v, 2 * x + 2, m, rx);
		}
	}
	int first_above(int v)
	{
		int ret = first_above(v, 0, 0, size);
		if (ret == size - 1)
		{
			if (tree[2 * size - 2] >= v)
				return ret;
			else
				return -1;
		}

		return first_above(v, 0, 0, size);
	}
};

struct segtreesum
{
	vll tree;
	int size;

	void init(int n)
	{
		size = 1;
		while (size < n) size *= 2;
		tree.assign(2 * size - 1, 0);
	}

	void build(vi& vec, int x, int lx, int rx)
	{
		if (rx == lx + 1)
		{
			if (lx < vec.size())
				tree[x] = vec[lx];
		}
		else
		{
			int m = (lx + rx) / 2;
			build(vec, 2 * x + 1, lx, m);
			build(vec, 2 * x + 2, m, rx);
			tree[x] = tree[2 * x + 1] + tree[2 * x + 2];
		}
	}

	void build(vi& vec)
	{
		init(vec.size());
		build(vec, 0, 0, size);
	}

	void set(int i, int v, int x, int lx, int rx)
	{
		if (rx - lx == 1)
			tree[x] = v;
		else
		{
			int m = (lx + rx) / 2;
			if (i < m)
				set(i, v, 2 * x + 1, lx, m);
			else
				set(i, v, 2 * x + 2, m, rx);
			tree[x] = tree[2 * x + 1] + tree[2 * x + 2];
		}
	}

	void set(int i, int v)
	{
		set(i, v, 0, 0, size);
	}
	ll sum(int l, int r, int x, int lx, int rx)
	{
		if (lx >= r || rx <= l)
			return 0;
		if (lx >= l && rx <= r)
			return tree[x];
		int m = (lx + rx) / 2;

		ll s1 = sum(l, r, 2 * x + 1, lx, m);
		ll s2 = sum(l, r, 2 * x + 2, m, rx);
		return s1 + s2;
	}
	ll sum(int l, int r)
	{
		sum(l, r, 0, 0, size);
	}

	ll max_segment()
	{
		ll seg1 = sum(0, size / 2);
		ll seg2 = sum(size / 2, size);
	}
};

struct dsu
{
	vi r, p;
	vi mx, mn, count, exp;
	vii clansMembers;
	dsu(int n)
	{
		range(0, n + 1)
		{
			p.push_back(i);
			mx.push_back(i);
			mn.push_back(i);
			clansMembers.push_back({ i });
		}
		exp.assign(n + 1, 0);
		r.assign(n + 1, 0);
		count.assign(n + 1, 1);
	}

	int getP(int a)
	{
		return p[a] = (p[a] == a ? a : getP(p[a]));
	}

	int getCount(int a)
	{
		return count[getP(a)];
	}
	int getMin(int a)
	{
		return mn[getP(a)];
	}
	int getMax(int a)
	{
		return mx[getP(a)];
	}
	int getExp(int a)
	{
		return exp[a];
	}

	void join(int a, int b)
	{
		for (auto i : clansMembers[b])
			clansMembers[a].push_back(i);
	}

	void unionn(int a, int b)
	{
		a = getP(a);
		b = getP(b);
		if (a == b) return;
		if (r[a] == r[b])
			r[a]++;
		if (r[a] > r[b])
		{
			p[b] = a;

			mx[a] = max(mx[a], mx[b]);
			mn[a] = min(mn[a], mn[b]);
			count[a] += count[b];

			join(a, b);
		}
		else
		{
			p[a] = b;

			mx[b] = max(mx[b], mx[a]);
			mn[b] = min(mn[b], mn[a]);
			count[b] += count[a];

			join(b, a);
		}

	}

	void addExp(int a, int amount)
	{
		for (auto i : clansMembers[getP(a)])
			exp[i] += amount;
	}
};



bool comp_BiggerToSmoller(int first, int second)
{
	return second < first;
}

ll mygcd(ll a, ll b)
{
	if (a % b == 0)
		return b;
	if (b % a == 0)
		return a;
	if (a > b)
		return  mygcd(a % b, b);
	return mygcd(a, b % a);
}

string grayString(int n)
{
	string alp = "abcdefghijklmnopqrstuvwxyz";
	string out = "";
	for (int i = 0; i < n; i++)
		out = out + alp[i] + out;
	return out;
}
vi zFunc(string s)
{
	int n = s.size();
	vi z(n, 0);
	for (int i = 1, l = 0, r = 0; i++; i < n)
	{
		if (i <= r)
			z[i] = min(r - i + 1, z[i - l]);
		while (z[i] + i < n && s[z[i]] == s[z[i] + i])
			z[i]++;
		if (r < i + z[i] - 1)
			l = i; r = i + z[i] - 1;
	}
	return z;
}

vi zFunc(vi vec)
{
	int n = vec.size();
	vi z(n);

	for (int i = 1, l = 0, r = 0; i < n; i++)
	{
		if (i <= r)
			z[i] == min(z[i - l], r - i + 1);
		while (z[i] + i < n && vec[z[i]] == vec[z[i] + 1])
			z[i]++;
		if (r < z[i] + i - 1)
			l = i, r = z[i] + i - 1;
	}
	return z;
}

vi makeSimple(int a, int b)
{
	for (int i = 2; i <= (int)sqrt(a) + 1; i++)
	{
		if (a % i == 0 && b % i == 0)
			return makeSimple(a / i, b / i);
	}
	return { a,b };
}

struct pt {
	double x, y;
	pt(double _x, double _y)
	{
		x = _x;
		y = _y;
	}
};

bool cmp(pt a, pt b) {
	return a.x < b.x || a.x == b.x && a.y < b.y;
}

bool cw(pt a, pt b, pt c) {
	return a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y) < 0;
}

bool ccw(pt a, pt b, pt c) {
	return a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y) > 0;
}

void graham(vector<pt>& a) {
	if (a.size() == 1)  return;
	sort(a.begin(), a.end(), &cmp);
	reverse(a.begin(), a.end());
	pt p1 = a[0], p2 = a.back();
	vector<pt> up, down;
	up.push_back(p1);
	down.push_back(p1);
	for (size_t i = 1; i < a.size(); ++i) {
		if (i == a.size() - 1 || cw(p1, a[i], p2)) {
			while (up.size() >= 2 && !cw(up[up.size() - 2], up[up.size() - 1], a[i]))
				up.pop_back();
			up.push_back(a[i]);
		}
		if (i == a.size() - 1 || ccw(p1, a[i], p2)) {
			while (down.size() >= 2 && !ccw(down[down.size() - 2], down[down.size() - 1], a[i]))
				down.pop_back();
			down.push_back(a[i]);
		}
	}
	a.clear();
	for (size_t i = 0; i < up.size(); ++i)
		a.push_back(up[i]);
	for (size_t i = down.size() - 2; i > 0; --i)
		a.push_back(down[i]);
}
double getDouble(string s)
{
	string ans = "";
	for (auto i : s)
	{
		if (i == *",")
			ans += ".";
		else
			ans += i;
	}
	return stod(ans);
}

vll erat(ll n)
{
	vll ans;
	for (ll i = 0; i < n + 1; ++i)
		ans.push_back(i);
	ans[1] = 0;
	for (ll i = 2; i < n + 1; ++i)
	{
		if (ans[i] != 0)
		{
			for (ll j = i * i; j < n + 1; j += i)
			{
				ans[j] = 0;
			}
		}
	}

	remove(ans.begin(), ans.end(), 0);
	vll realAns;
	ll i = 0;
	while (ans[i] != 0)
		realAns.push_back(ans[i]), i++;
	return realAns;
}

void count_sort(vi& p, vi& c)
{
	int n = p.size();

	vi cnt(n);
	for (auto x : c)
		cnt[x]++;

	vi p_new(n);
	vi pos(n);

	pos[0] = 0;
	range(1, n)
		pos[i] = pos[i - 1] + cnt[i - 1];

	for (auto x : p)
	{
		int i = c[x];
		p_new[pos[i]] = x;
		pos[i]++;

	}
	p = p_new;


}



void suffVector()
{
	string s;
	cin >> s;
	s += "$";
	int n = s.size();
	vi p(n), c(n);

	//k = 0
	{
		vector<pair<char, int>> a(n);
		range(0, n)  a[i] = { s[i],i };

		sort(a.begin(), a.end());

		range(0, n) p[i] = a[i].second;
		c[p[0]] = 0;
		range(1, n)
		{
			if (a[i].first == a[i - 1].first)
				c[p[i]] = c[p[i - 1]];
			else
				c[p[i]] = c[p[i - 1]] + 1;
		}
	}

	//end


	int k = 0;
	while ((1 << k) < n)
	{
		//k -> k+1	
		 
		range(0, n) p[i] = (p[i] - (1 << k) + n) % n;


		count_sort(p, c);
											

		vi c_new(n);
		c_new[p[0]] = 0;
		range(1, n) 
		{
			pair<int, int> now = { c[p[i]] , c[(p[i] + (1 << k)) % n] }; 
			pair<int, int> prev = { c[p[i-1]] , c[(p[i-1] + (1 << k)) % n] };

			if (now == prev)
				c_new[p[i]] = c_new[p[i - 1]];
			else
				c_new[p[i]] = c_new[p[i - 1]] + 1;
			
		}
		c = c_new;
		k++;
	}

	//getting 

	range(0, n)
		cout << p[i] << " ";

}

ull fact(int a)
{
	ull ans = 1;
	for (int i = 1; i <= a; i++)
		ans *= i;
	return ans;
}
ull cnk(int n, int k)
{

	int l = n - k + 1, r = n;
	ull ans = 1;
	range(l, r + 1)
		ans *= i;
	return ans / fact(k);
}

short subComp(string s, string  sub)
{
	range(0, sub.size())
	{
		if (sub[i] > s[i])
			return 2;
		if (sub[i] < s[i])
			return 1;
	}
	return 0;
}
int endOfRow(vi& vec,int id )
{
	range(id, vec.size())
	{
		if (vec[i] != 3)
			return i;
	}
	return vec.size();
}
bool set_compare(set<int> const& lhs, set<int> const& rhs) {
	return equal(lhs.begin(), lhs.end(), rhs.begin());
}

void solve1()
{
	int n,tests;
	cin >> n>>tests;
	vi buf(n, 0);

	vector<vector<bool>> table(tests, vector<bool>(n,0));
	vector<bool> prevDay(n, 0);
	//first day;
	char op;
	int l, r;
	cin >> op >> l >> r;
	l--, r--;
	if (op == '+')
	{
		range(l, r + 1)
			table[0][i] = 1;
	}


	for(int day = 1; day < tests; ++day)
	{
		cin >> op >> l >> r;
		l--, r--;
		if (op == '+')
		{
			range(0, n)
			{
				if ((i >= l && i <= r) || table[day - 1][i])
					table[day][i] = 1;
			}
		}
		else
		{
			range(0, n)
			{
				if ((i < l || i>r) && (table[day - 1][i]))
					table[day][i] = 1;
			}
		}

	}


	//calculate da table
	int houseSum = 0;
	for (int house = 0; house < n; ++house)
	{
		for (int day = 0; day < tests; ++day)
			houseSum += table[day][house];
		cout <<tests - houseSum << " ";
		houseSum = 0;
	}
}

void solve8689()
{
	int n, tests;
	cin >> n >> tests;
	vi ans(n, 0);
	vb prevDay(n, 0);
	//first day;
	char op;
	int l, r;
	cin >> op >> l >> r; 
	l--, r--;
	if (op == '+')
	{
		range(l, r + 1)
		{
			ans[i] = 1;
			prevDay[i] = 1;
		}
	}


	for (int day = 1; day < tests; ++day)
	{
		cin >> op >> l >> r;
		l--, r--;
		if (op == '+')
		{
			range(0, n)
			{
				if ((i >= l && i <= r) || prevDay[i])
				{
					ans[i]++;
					prevDay[i] = 1;
				}
				else
					prevDay[i] = 0;
			}
		}
		else
		{
			range(0, n)
			{
				if ((i < l || i>r) && prevDay[i])
				{
					ans[i]++;
					prevDay[i] = 1;
				}
				else
					prevDay[i] = 0;
			}
		}
	}
	for (auto i : ans)
		cout <<  tests - i << ' ';
}


void solve()
{
	int n;
	cin >> n;
	vi coord(n);
	vi height(n);
	int nearestLeft = 0;
	int k = 2;
	range(0, n)
		cin >> coord[i] >> height[i];
	range(1, n-1)
	{
		int delta = coord[i] - nearestLeft;
		int rightDelta = coord[i + 1] - coord[i];
		if (delta > height[i])
		{
			k++;
			nearestLeft = coord[i];
		}
		else if (rightDelta > height[i])
		{
			k++;
			nearestLeft = coord[i] + height[i];

		}
	}
	cout << k;
}

void debug()
{
	while (1)	
	{
		solve();
		//cout << out[out.size() - 1] << endl;
	}
}
void multitesting()
{
	int tests; cin >> tests;
	range(0, tests)
		solve();
	//range(0, tests)
	//	cout << out[i] << endl;
}
int main()
{
	std::ios_base::sync_with_stdio(false);
	cin.tie(0);
	solve();
	
}