#include <iostream>
#include <vector>
#include <array>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <tuple>
#include <bitset>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>
struct Point {
	double x, y;
	double distance_from(const Point& that) const;
	Point move(const struct Vector& vec) const;
};
struct Vector {
	double dx, dy;
	Vector(const Point& to, const Point& from) : dx{ to.x - from.x }, dy{ to.y - from.y }{};
	Vector(const double _dx, const double _dy) :dx{ _dx }, dy{ _dy }{};
	Vector rotate(const struct Angle& angle) const;
	double length() const;
};
struct Line {
private:
	Line(const double _a, const double _b, const double _c) :a{ _a }, b{ _b }, c{ _c }{};
public:
	double a, b, c;
	Line(const Point& from, const Point& to) : a{ to.y - from.y }, b{ from.x - to.x }, c{ to.x * from.y - to.y * from.x }{};
	Line(const Point& point, const Vector& vec) : Line(point, Point{ point.x + vec.dx, point.y + vec.dy }){};
	double distance_from(const Point& that) const;
	Line shift_cathetus(const double dx) const;
};
struct Angle {
	double sin, cos;
	static Angle from_sin(const double sin);
	Angle operator+(const Angle& that) const;
	Angle operator-(const Angle& that) const;
	Angle operator-() const;
};
struct Circle {
	Point center;
	double radius;
	Circle change_radius(const double new_radius) const;
};
std::vector<Line> common_tangent(const Circle& a, const Circle& b) {
	std::vector<Line> result;
	const auto distance = a.center.distance_from(b.center);
	if (distance + a.radius <= b.radius || distance + b.radius <= a.radius) return result;
	const auto diff_angle = Angle::from_sin(std::abs(a.radius - b.radius) / distance);
	Vector vec(a.center, b.center);
	result.push_back(Line(b.center, vec.rotate(diff_angle)).shift_cathetus((a.radius > b.radius) ? b.radius : - b.radius));
	result.push_back(Line(b.center, vec.rotate(-diff_angle)).shift_cathetus((a.radius > b.radius) ? -b.radius : b.radius));
	if (distance >= a.radius + b.radius) {
		const auto add_angle = Angle::from_sin((a.radius + b.radius) / distance);
		result.push_back(Line(b.center, vec.rotate(add_angle)).shift_cathetus(-b.radius));
		result.push_back(Line(b.center, vec.rotate(-add_angle)).shift_cathetus(b.radius));
	}
	if (std::any_of(result.begin(), result.end(), [&a, &b](const Line& l) {return std::abs(l.distance_from(a.center) - a.radius) >= 1e-9 || std::abs(l.distance_from(b.center) - b.radius) >= 1e-9; })) {
		auto pos_b = b.center.move(vec.rotate(diff_angle));
		auto line_ba = Line(b.center, vec.rotate(diff_angle));
		auto pos_b_r = b.center.move(vec.rotate(-diff_angle));
		auto line_ba_r = Line(b.center, vec.rotate(-diff_angle));
		std::vector<std::vector<double>> distances;
		std::transform(result.begin(), result.end(), std::back_inserter(distances), [a, b](const Line& l) {return std::vector<double>{l.distance_from(a.center), l.distance_from(b.center)}; });
		throw "???";
	}
	return result;
}
struct Jewel {
	Circle circle;
	double magnet;
};
std::vector<Line> common_tangent(const Jewel& a, const Jewel& b) {
	std::vector<Line> result;
	for (const auto& line : common_tangent(a.circle, b.circle)) result.push_back(line);
	for (const auto& line : common_tangent(a.circle.change_radius(a.magnet + a.circle.radius), b.circle)) result.push_back(line);
	for (const auto& line : common_tangent(a.circle, b.circle.change_radius(b.magnet + b.circle.radius))) result.push_back(line);
	for (const auto& line : common_tangent(a.circle.change_radius(a.magnet + a.circle.radius), b.circle.change_radius(b.magnet + b.circle.radius))) result.push_back(line);
	return result;
}
int main() {
	while (true) {
		int n; std::cin >> n; if (n == 0) break;
		std::vector<Jewel> jewels(n); for (auto& j : jewels) std::cin >> j.circle.center.x >> j.circle.center.y >> j.circle.radius >> j.magnet;
		int max_correctable = 1;
		for (auto i = 0; i < n; ++i) {
			for (auto j = 0; j < i; ++j) {
				for (const auto line : common_tangent(jewels[i], jewels[j])) {
					int count = 2;
					for (auto k = 0; k < n; ++k) if (i != k && j != k) {
						auto distance = line.distance_from(jewels[k].circle.center) - jewels[k].circle.radius;
						if (0 <= distance && distance <= jewels[k].magnet) ++count;
					}
					max_correctable = std::max(max_correctable, count);
				}
			}
		}
		std::cout << max_correctable << '\n';
	}
}


double Line::distance_from(const Point& that) const
{
	return std::abs(a * that.x + b * that.y + c) / std::sqrt(a * a + b * b);
}

Line Line::shift_cathetus(const double length) const
{
	const auto len = std::sqrt(a * a + b * b);
	const auto dx = -a / len * length;
	const auto dy = b / len * length;
	return Line(a, b, c + b * dy - a * dx);
}

double Point::distance_from(const Point& that) const
{
	return Vector(*this, that).length();
}

Point Point::move(const Vector& vec) const
{
	return Point{ x + vec.dx, y + vec.dy };
}

Vector Vector::rotate(const Angle& angle) const
{
	return Vector{dx * angle.cos - dy * angle.sin, dx * angle.sin + dy * angle.cos};
}

double Vector::length() const
{
	return std::sqrt(dx * dx + dy * dy);
}

Angle Angle::from_sin(const double sin)
{
	return Angle{ sin, std::sqrt(1 - sin * sin) };
}

Angle Angle::operator+(const Angle& that) const
{
	return Angle{ sin * that.cos + cos * that.sin, cos * that.cos - sin * that.sin };
}

Angle Angle::operator-(const Angle& that) const
{
	return Angle{ sin * that.cos - cos * that.sin, cos * that.cos + sin * that.sin };
}

Angle Angle::operator-() const
{
	return Angle{ -sin, cos };
}

Circle Circle::change_radius(const double new_radius) const
{
	return Circle{ center, new_radius };
}



Measured memory_bytes: 3196