#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for (int i=0; i<(n); ++i)
#define RREP(i, n) for (int i=(int)(n)-1; i>=0; --i)
#define FOR(i, a, n) for (int i=(a); i<(n); ++i)
#define RFOR(i, a, n) for (int i=(int)(n)-1; i>=(a); --i)

#define SZ(x) ((int)(x).size())
#define all(x) begin(x),end(x)

#define dump(x) cerr<<#x<<" = "<<(x)<<endl
#define debug(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl;

template<class T>
ostream &operator<<(ostream &os, const vector <T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}

template<class T, class U>
ostream &operator<<(ostream &os, const pair <T, U> &p) {
    return os << "(" << p.first << " " << p.second << ")";
}

template<class T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
bool chmin(T &a, const T &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vvll = vector<vll>;

const ll MOD = 1e9 + 7;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;
const ld EPS = 1e-9;


using Real = double;
const Real PI = acos(-1);

using Point = complex<Real>;
struct Line {
    Point a, b;
    Line() {}
    Line(const Point& a, const Point& b) : a(a), b(b) {}
    friend ostream& operator<<(ostream& os, const Line& l) {
        return os << "[" << l.a << "," << l.b << "]";
    }
};

struct Circle {
    Point p;
    Real r;
    Circle() {}
    Circle(const Point& p, Real r) : p(p), r(r) {}
};

inline bool eq(Real a, Real b) { return abs(b - a) < EPS; }

Point rotate(const Point &p, Real theta) {
    return p * polar((Real)1.0, theta);
}

vector<Line> common_tangent(const Circle& c1, const Circle& c2) {
    vector<Line> lines;
    Point u = c2.p - c1.p;
    Real d = abs(u);
    if (eq(d, 0.0)) return lines;
    u /= d;
    for (Real s : { -1, 1 }) {
        Real h = (c1.r + s * c2.r) / d;
        if (eq(abs(h), 1.0)) {
            lines.emplace_back(
                    c1.p + u * h * c1.r,
                    c1.p + u * h * c1.r + rotate(u, PI / 2.0));
        } else if (abs(h) < 1) {
            Real a = acos(h);
            lines.emplace_back(
                    c1.p + u * polar(c1.r, a),
                    c2.p - s * u * polar(c2.r, a));
            lines.emplace_back(
                    c1.p + u * polar(c1.r, -a),
                    c2.p - s * u * polar(c2.r, -a));
        }
    }
    return lines;
}

Real dot(const Point& a, const Point& b) {
    return a.real() * b.real() + a.imag() * b.imag();
}

Point projection(const Line& l, const Point& p) {
    Real A = dot(l.b - l.a, p - l.a),
            B = dot(l.a - l.b, p - l.b);
    return (A * l.b + B * l.a) / (A + B);
}

Real distance(const Line& l, const Point& p) {
    return abs(p - projection(l, p));
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

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

        vector<Circle> circles(2*n);
        vector<Point> points(n);
        vector<double> r(n), m(n);
        REP(i, n) {
            double x, y;
            cin >> x >> y >> r[i] >> m[i];
            m[i] += r[i];
            points[i] = Point{ x, y };
            circles[2*i] = Circle{ points[i], r[i] };
            circles[2*i+1] = Circle{ points[i], m[i] };
        }

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

        int ans = 0;
        REP(i, 2*n) {
            FOR(j, i+1, 2*n) {
                vector<Line> lines = common_tangent(circles[i], circles[j]);
                for (Line& line : lines) {
                    int total = 0;
                    REP(k, n) {
                        double d = distance(line, points[k]);
                        if (r[k] < d + EPS and d < m[k] + EPS) ++total;
                    }
                    chmax(ans, total);
                }
            }
        }
        cout << ans << endl;
    }

    return 0;
}



Measured memory_bytes: 3656