#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

const double EPS = 1.0e-10;

class Point
{
public:
    double y, x;
    Point(){
        y = x = 0.0;
    }
    Point(double y0, double x0){
        y = y0;
        x = x0;
    }
    Point operator+(const Point& p) const{
        return Point(y + p.y, x + p.x);
    }
    Point operator-(const Point& p) const{
        return Point(y - p.y, x - p.x);
    }
    Point operator*(double a) const{
        return Point(y * a, x * a);
    }
    Point operator/(double a) const{
        return Point(y / a, x / a);
    }
    double length() const{
        return sqrt(y * y + x * x);
    }
    double dist(const Point& p) const{
        return sqrt(pow(y - p.y, 2) + pow(x - p.x, 2));
    }
    double dot(const Point& p) const{
        return y * p.y + x * p.x; // |a|*|b|*cosθ
    }
    double cross(const Point& p) const{
        return x * p.y - y * p.x; // |a|*|b|*sinθ
    }
};

class Line
{
public:
    double a, b, c; // a*x + b*y + c = 0
    Line(){
        a = c = 0.0;
        b = 1.0;
    }
    Line(double a0, double b0, double c0){
        a = a0;
        b = b0;
        c = c0;
    }
    Line(const Point& p1, const Point& p2){ // 2点を結ぶ直線
        double dy = p2.y - p1.y;
        double dx = p2.x - p1.x;
        if(abs(dy / dx) < EPS){
            a = 0.0;
            b = 1.0;
            c = -p1.y;
        }else if(abs(dx / dy) < EPS){
            a = 1.0;
            b = 0.0;
            c = -p1.x;
        }else{
            a = - dy / dx;
            b = 1.0;
            c = dy / dx * p1.x - p1.y;
        }
    }
    double dist(const Point& p) const{ // 点との距離
        return abs(a * p.x + b * p.y + c) / sqrt(a * a + b * b);
    }
    void shift(const Point& p){ // 平行移動
        c -= a * p.x + b * p.y;
    }
};

vector<Line> solve(const Point& c1, double r1, const Point& c2, double r2)
{
    Point c = c2 - c1;
    double len2 = c.y * c.y + c.x * c.x;
    vector<Line> ret;
    if(len2 < EPS)
        return ret;

    // 共通外接線
    double d = len2 - pow(r1 - r2, 2);
    if(d > EPS){
        ret.push_back(Line((c.x * (r1 - r2) + c.y * sqrt(d)) * r1 / len2,
                           (c.y * (r1 - r2) - c.x * sqrt(d)) * r1 / len2,
                           - r1 * r1));
        ret.push_back(Line((c.x * (r1 - r2) - c.y * sqrt(d)) * r1 / len2,
                           (c.y * (r1 - r2) + c.x * sqrt(d)) * r1 / len2,
                           - r1 * r1));
    }else if(d > -EPS){
        ret.push_back(Line((c.x * (r1 - r2)) * r1 / c.length(),
                           (c.y * (r1 - r2)) * r1 / c.length(),
                           - r1 * r1));
    }
    
    // 共通内接線
    d = len2 - pow(r1 + r2, 2);
    if(d > EPS){
        ret.push_back(Line((c.x * (r1 + r2) + c.y * sqrt(d)) * r1 / len2,
                           (c.y * (r1 + r2) - c.x * sqrt(d)) * r1 / len2,
                           - r1 * r1));
        ret.push_back(Line((c.x * (r1 + r2) - c.y * sqrt(d)) * r1 / len2,
                           (c.y * (r1 + r2) + c.x * sqrt(d)) * r1 / len2,
                           - r1 * r1));
    }else if(d > -EPS){
        ret.push_back(Line((c.x * (r1 + r2)) * r1 / c.length(),
                           (c.y * (r1 + r2)) * r1 / c.length(),
                           - r1 * r1));
    }

    for(unsigned i=0; i<ret.size(); ++i)
        ret[i].shift(c1);
    return ret;
}

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        vector<Point> c(n);
        vector<double> r(n), m(n);
        for(int i=0; i<n; ++i)
            cin >> c[i].x >> c[i].y >> r[i] >> m[i];

        if(n == 1){
            cout << 1 << endl;
            continue;
        }

        int ret = 0;
        for(int s=0; s<n; ++s){
            for(int t=0; t<s; ++t){
                for(int k=0; k<4; ++k){
                    double a = r[s];
                    double b = r[t];
                    if(k & 1)
                        a += m[s];
                    if(k & 2)
                        b += m[t];
                    vector<Line> line = solve(c[s], a, c[t], b);


                    for(unsigned i=0; i<line.size(); ++i){
                        int tmp = 0;
                        for(int j=0; j<n; ++j){
                            double d = line[i].dist(c[j]);
                            if(r[j] - EPS < d && d < r[j] + m[j] + EPS)
                                ++ tmp;
                        }
                        ret = max(ret, tmp);
                    }
                }
            }
        }
        cout << ret << endl;
    }
}

Measured memory_bytes: 1240