#include <iostream>
using namespace std;
struct archerProfile {
unsigned long x;
unsigned long r;
unsigned int c;
}archer[1000];
int main(){
int n;
int commands = 1;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> archer[i].x >> archer[i].r >> archer[i].c;
}
for (int i = 0; i < n - 1; i++) {
unsigned long long distanceBetweenArchers = archer[i + 1].x - archer[i].x;
if (distanceBetweenArchers > archer[i].c * archer[i].r) {
commands += 1;
}
}
cout << commands;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwpzdHJ1Y3QgYXJjaGVyUHJvZmlsZSB7CiAgdW5zaWduZWQgbG9uZyB4OwogIHVuc2lnbmVkIGxvbmcgcjsKICB1bnNpZ25lZCBpbnQgYzsKfWFyY2hlclsxMDAwXTsKaW50IG1haW4oKXsgCiAgaW50IG47CiAgaW50IGNvbW1hbmRzID0gMTsKICBjaW4gPj4gbjsKICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgY2luID4+IGFyY2hlcltpXS54ID4+IGFyY2hlcltpXS5yID4+IGFyY2hlcltpXS5jOwogIH0KICBmb3IgKGludCBpID0gMDsgaSA8IG4gLSAxOyBpKyspIHsKICAgIHVuc2lnbmVkIGxvbmcgbG9uZyBkaXN0YW5jZUJldHdlZW5BcmNoZXJzID0gYXJjaGVyW2kgKyAxXS54IC0gYXJjaGVyW2ldLng7CiAgICBpZiAoZGlzdGFuY2VCZXR3ZWVuQXJjaGVycyA+IGFyY2hlcltpXS5jICogYXJjaGVyW2ldLnIpIHsKICAgICAgY29tbWFuZHMgKz0gMTsKICAgIH0KICB9CiAgY291dCA8PCBjb21tYW5kczsKICByZXR1cm4gMDsKfQ==