#include <bits/stdc++.h>

using namespace std;

#define int long long
#define all(v) (v).begin(), (v).end()
#define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__)
#define reps(i, m, n) for(int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) reps(i, 0, n)

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

typedef pair<int, int> Pi;
typedef tuple<int, int, int> Ti;
typedef vector<int> vint;

const int inf = 1LL << 55;
const int mod = 1e9 + 7;

#define EPS (1e-8)
#define eq(a, b) (fabs((a)-(b)) < EPS)
#define lt(a, b) ((a) - (b) < -EPS)
#define le(a, b) (eq(a, b) || lt(a, b))

struct Point {
  double x, y;
  Point(double x = 0.0, double y = 0.0):x(x), y(y){}

  Point operator + (Point p) { return Point(x + p.x, y + p.y); }
  Point operator - (Point p) { return Point(x - p.x, y - p.y); }
  Point operator * (double a) { return Point(x * a, y * a); }
  Point operator / (double a) { return Point(x / a, y / a); }

  double abs() { return sqrt(norm()); }
  double norm() { return x*x + y*y; }

  bool operator < (const Point& p) const {
    return x != p.x ? x < p.x : y < p.y;
  }
  bool operator == (const Point& p) const {
    return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
};
typedef Point Vector;

double norm(Vector v) { return v.x*v.x + v.y*v.y; }
double abs(Vector v) { return sqrt(norm(v)); }
double dot(Vector a, Vector b) { return a.x*b.x + a.y*b.y; }
double cross(Vector a, Vector b) { return a.x*b.y - a.y*b.x; }

Point rotate(Point p, double th) {
  // th[rad]
  return Point(cos(th)*p.x-sin(th)*p.y, sin(th)*p.x+cos(th)*p.y);
}
Point rotate90(Point p) {
  return Point(-p.y, p.x);
}

#define COUNTER_CLOCKWISE +1
#define CLOCKWISE         -1
#define ONLINE_BACK       +2
#define ONLINE_FRONT      -2
#define ON_SEGMENT        +0
int ccw(Point p0, Point p1, Point p2) {
  Vector a = p1 - p0;
  Vector b = p2 - p0;
  if(cross(a, b) > EPS) return COUNTER_CLOCKWISE;
  if(cross(a, b) < -EPS) return CLOCKWISE;
  if(dot(a, b) < -EPS) return ONLINE_BACK;
  if(a.norm() < b.norm()) return ONLINE_FRONT;
  return ON_SEGMENT;
}
bool intersect(Point p1, Point p2, Point p3, Point p4) {
  return (ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 &&
	  ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0);
}

double getDistance(Point a, Point b) { return abs(a - b); }

struct Segment {
  Point s, t;
  Segment(Point s = Point(), Point t = Point()):s(s), t(t){}
};
typedef Segment Line;

Point project(Segment s, Point p) {
  Vector base = s.t - s.s;
  double r = dot(p - s.s, base) / norm(base);
  return s.s + base * r;
}

double getDistanceLP(Line l, Point p) {
  return abs(cross(l.t - l.s, p - l.s) / abs(l.t - l.s));
}

struct Circle {
  Point p;
  double r;
  Circle(Point p = Point(), double r = 0.0):p(p), r(r){}
};

bool intersect(Circle c1, Circle c2) {
  double d = getDistance(c1.p, c2.p);
  return le(d, c1.r+c2.r) && !lt(d, fabs(c1.r-c2.r));
}

vector<Point> getCrossPointsCL(Circle c, Line l) {
  vector<Point> res;
  Vector pr = project(l, c.p);
  if(lt(c.r, abs(c.p-pr))) return res;
  Vector e = (l.t-l.s)/abs(l.t-l.s);
  double base = sqrt(c.r*c.r-norm(pr-c.p));
  res.push_back(pr+e*base);
  if(!eq(base, 0)) res.push_back(pr-e*base);
  return res;
}

vector<Point> tangentCP(Circle c, Point p) {
  Vector a = p-c.p;
  vector<Point> res;
  double x = norm(a);
  double d = x-c.r*c.r;
  if(d < -EPS) return res;
  d = max(d, 0.0);
  Point p1 = a*(c.r*c.r/x);
  Point p2 = rotate90(a)*(-c.r*sqrt(d)/x);
  res.emplace_back(c.p+p1-p2);
  res.emplace_back(c.p+p1+p2);
  return res;
}

vector<Line> tangentCC(Circle c1, Circle c2) {
  vector<Line> res;
  vector<Point> ps, qs;
  if(abs(c2.p-c1.p) < EPS) return res;
  // ?????\???
  if(abs(c1.r-c2.r) < EPS) {
    Point dir = c2.p-c1.p;
    dir = rotate90(dir*(c1.r/abs(dir)));
    res.emplace_back(c1.p+dir, c2.p+dir);
    res.emplace_back(c1.p-dir, c2.p-dir);
  } else {
    Point p = c1.p*(-c2.r)+c2.p*c1.r;
    p = p*(1.0/(c1.r-c2.r));
    ps = tangentCP(c1, p);
    qs = tangentCP(c2, p);
    int n = ps.size(), m = qs.size();
    for(int i = 0; i < min(n, m); i++) {
      res.emplace_back(ps[i], qs[i]);
    }
  }
  // ?????\???
  Point p = c1.p*c2.r+c2.p*c1.r;
  p = p*(1.0/(c1.r+c2.r));
  ps = tangentCP(c1, p);
  qs = tangentCP(c2, p);
  int n = ps.size(), m = qs.size();
  for(int i = 0; i < min(n, m); i++) {
    res.emplace_back(ps[i], qs[i]);
  }
  return res;
}

int N;
vector<Circle> C;
vector<double> m;

int getJewels(Line l) {
  int res = 0;
  rep(i, N) {
    double dist = getDistanceLP(l, C[i].p);
    if(lt(dist, C[i].r)) continue;
    if(le(dist, m[i]+C[i].r)) res++;
  }
  return res;
}

signed main()
{
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  while(cin >> N, N) {
    resz(C, N);
    resz(m, N);
    rep(i, N) cin >> C[i].p.x >> C[i].p.y >> C[i].r >> m[i];
    if(N == 1) {
      cout << 1 << endl;
      continue;
    }
    int ans = 0;
    rep(i, N) reps(j, i+1, N) {
      Circle c1(C[i].p, C[i].r+m[i]), c2(C[j].p, C[j].r+m[j]);
      vector<Line> L1 = tangentCC(C[i], C[j]);
      for(Line l : L1) chmax(ans, getJewels(l));
      vector<Line> L2 = tangentCC(C[i], c2);
      for(Line l : L2) chmax(ans, getJewels(l));
      vector<Line> L3 = tangentCC(c1, C[j]);
      for(Line l : L3) chmax(ans, getJewels(l));
      vector<Line> L4 = tangentCC(c1, c2);
      for(Line l : L4) chmax(ans, getJewels(l));
    }
    cout << ans << endl;
  }

  return 0;
}

Measured memory_bytes: 3244