#include <bits/stdc++.h>
using namespace std;
using Real = double;
using Point = complex< Real >;
const Real EPS = 1e-12, PI = acos(-1);

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

Point operator*(const Point &p, const Real &d) {
    return Point(real(p) * d, imag(p) * d);
}

istream &operator>>(istream &is, Point &p) {
    Real a, b;
    is >> a >> b;
    p = Point(a, b);
    return is;
}

ostream &operator<<(ostream &os, Point &p) {
    os << fixed << setprecision(10) << p.real() << " " << p.imag();
    return os;
}

Point rotate(Real theta, const Point &p) {
    return Point(cos(theta) * p.real() - sin(theta) * p.imag(), sin(theta) * p.real() + cos(theta) * p.imag());
}

namespace std {
    bool operator<(const Point &a, const Point &b) {
        return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag();
    }
}


struct Line {
    Point a, b;

    Line() = default;

    Line(Point a, Point b) : a(a), b(b) {}

    Line(Real A, Real B, Real C) // Ax + By = C
    {
        if(eq(A, 0)) a = Point(0, C / B), b = Point(1, C / B);
        else if(eq(B, 0)) b = Point(C / A, 0), b = Point(C / A, 1);
        else a = Point(0, C / B), b = Point(C / A, 0);
    }

    friend ostream &operator<<(ostream &os, Line &p) {
        return os << p.a << " to " << p.b;
    }

    friend istream &operator>>(istream &is, Line &a) {
        return is >> a.a >> a.b;
    }
};

struct Circle {
    Point p;
    Real r;

    Circle() = default;

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

using Points = vector< Point >;
using Lines = vector< Line >;
using Circles = vector< Circle >;

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

Point projection(const Line &l, const Point &p) {
    double t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
    return l.a + (l.a - l.b) * t;
}

Real distance(const Line &l, const Point &p);

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

// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_7_G
Lines tangent(Circle c1, Circle c2) {
    Lines ret;
    if(c1.r < c2.r) swap(c1, c2);
    Real g = norm(c1.p - c2.p);
    if(eq(g, 0)) return ret;
    Point u = (c2.p - c1.p) / sqrt(g);
    Point v = rotate(PI * 0.5, u);
    for(int s : {-1, 1}) {
        Real h = (c1.r + s * c2.r) / sqrt(g);
        if(eq(1 - h * h, 0)) {
            ret.emplace_back(c1.p + u * c1.r, c1.p + (u + v) * c1.r);
        } else if(1 - h * h > 0) {
            Point uu = u * h, vv = v * sqrt(1 - h * h);
            ret.emplace_back(c1.p + (uu + vv) * c1.r, c2.p - (uu + vv) * c2.r * s);
            ret.emplace_back(c1.p + (uu - vv) * c1.r, c2.p - (uu - vv) * c2.r * s);
        }
    }
    return ret;
}

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

    while (1) {
        int n;
        cin >> n;
        if (n == 0) break;
        vector<Circle> cs, lcs, as;
        for (int i = 0; i < n; i++) {
            int x, y, r, m;
            cin >> x >> y >> r >> m;
            cs.emplace_back(Circle(Point(x, y), r));
            lcs.emplace_back(Circle(Point(x, y), m + r));
            as.emplace_back(cs.back());
            as.emplace_back(lcs.back());
        }

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

        int ans = 0;
        for (int i = 0; i < 2 * n; i++) {
            for (int j = i + 1; j < 2 * n; j++) {
                vector<Line> ls = tangent(as[i], as[j]);
                for (auto &l : ls) {
                    int cnt = 0;
                    for (int k = 0; k < n; k++) {
                        if (distance(l, cs[k].p) < cs[k].r - EPS) continue;
                        if (distance(l, cs[k].p) > lcs[k].r + EPS) continue;
                        cnt++;
                    }
                    ans = max(ans, cnt);
                }
            }
        }
        cout << ans << endl;
    }
}


Measured memory_bytes: 3620