#include "bits/stdc++.h"

using namespace std;

typedef long long ll;
typedef pair<int,int> P;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max()/2;
const int MOD = 1e9+7;

#define ALL(x) (x).begin(),(x).end()

typedef long double ld;
typedef complex<ld> Point;

const ld eps = 1e-9, pi = acos(-1.0);

namespace std {
	bool operator<(const Point &lhs, const Point &rhs) {
		if (lhs.real() < rhs.real() - eps) return true;
		if (lhs.real() > rhs.real() + eps) return false;
		return lhs.imag() < rhs.imag();
	}
}

bool eq(ld a, ld b) {
	return (abs(a - b) < eps);
}

// dot of a and b
ld dot(Point a, Point b) {
	return real(conj(a) * b);
}

// cross of a and b
ld cross(Point a, Point b) {
	return imag(conj(a) * b);
}

class Line {
public:
	Point a, b;
	Line() : a(Point(0, 0)), b(Point(0, 0)) {}
	Line(Point a, Point b) : a(a), b(b) {}
};

class Circle {
public:
	Point p;
	ld r;
	Circle() : p(Point(0, 0)), r(0) {}
	Circle(Point p, ld r) : p(p), r(r) {}
};

Point proj(Line l, Point p) {
	ld t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
	//norm::��Βl��2��
	return l.a + t * (l.a - l.b);
}

ld dist_lp(Line l, Point p) {
	return abs(p - proj(l, p));
}

vector<Line> tangent_cp(Circle c, Point p) {
	vector<Line> ret;
	Point v = c.p - p;
	ld d = abs(v);
	ld l = sqrt(norm(v) - c.r * c.r);
	if (isnan(l)) { return ret; }
	Point v1 = v * Point(l / d, c.r / d);
	Point v2 = v * Point(l / d, -c.r / d);
	ret.push_back(Line(p, p + v1));
	if (l < eps) return ret;
	ret.push_back(Line(p, p + v2));
	return ret;
}

vector<Line> tangent_cc(Circle c1, Circle c2) {
	vector<Line> ret;
	if (abs(c1.p - c2.p) - (c1.r + c2.r) > -eps) {
		Point center = (c1.p * c2.r + c2.p * c1.r) / (c1.r + c2.r);
		ret = tangent_cp(c1, center);
	}
	if (abs(c1.r - c2.r) > eps) {
		Point out = (-c1.p * c2.r + c2.p * c1.r) / (c1.r - c2.r);
		vector<Line> nret = tangent_cp(c1, out);
		ret.insert(ret.end(), ALL(nret));
	}
	else {
		Point v = c2.p - c1.p;
		v /= abs(v);
		Point q1 = c1.p + v * Point(0, 1) * c1.r;
		Point q2 = c1.p + v * Point(0, -1) * c1.r;
		ret.push_back(Line(q1, q1 + v));
		ret.push_back(Line(q2, q2 + v));
	}
	return ret;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    while(cin>>n,n){
        vector<Circle> c;
        vector<ld> m(n);
        for(int i=0;i<n;i++){
            ld x,y,r;
            cin>>x>>y>>r>>m[i];
            c.push_back(Circle(Point(x,y),r));
        }
        if(n==1){
            cout<<1<<endl;
            continue;
        }
        int res=0;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                vector<Line> ls=tangent_cc(c[i],c[j]);
                for(int k=0;k<(int)ls.size();k++){
                    int tmp=0;
                    for(int idx=0;idx<n;idx++){
                        ld d=dist_lp(ls[k],c[idx].p);
                        if(c[idx].r<d+eps && d-c[idx].r<m[idx]+eps) tmp++;
                    }
                    res=max(res,tmp);
                }
                ls=tangent_cc(Circle(c[i].p,c[i].r+m[i]),Circle(c[j].p,c[j].r));
                for(int k=0;k<(int)ls.size();k++){
                    int tmp=0;
                    for(int idx=0;idx<n;idx++){
                        ld d=dist_lp(ls[k],c[idx].p);
                        if(c[idx].r<d+eps && d-c[idx].r<m[idx]+eps) tmp++;
                    }
                    res=max(res,tmp);
                }
                ls=tangent_cc(Circle(c[i].p,c[i].r),Circle(c[j].p,c[j].r+m[j]));
                for(int k=0;k<(int)ls.size();k++){
                    int tmp=0;
                    for(int idx=0;idx<n;idx++){
                        ld d=dist_lp(ls[k],c[idx].p);
                        if(c[idx].r<d+eps && d-c[idx].r<m[idx]+eps) tmp++;
                    }
                    res=max(res,tmp);
                }
                ls=tangent_cc(Circle(c[i].p,c[i].r+m[i]),Circle(c[j].p,c[j].r+m[j]));
                for(int k=0;k<(int)ls.size();k++){
                    int tmp=0;
                    for(int idx=0;idx<n;idx++){
                        ld d=dist_lp(ls[k],c[idx].p);
                        if(c[idx].r<d+eps && d-c[idx].r<m[idx]+eps) tmp++;
                    }
                    res=max(res,tmp);
                }
            }
        }
        cout<<res<<endl;
    }
}


Measured memory_bytes: 3440