  We investigate the solar-system constraint on the f(R) theory of modified
gravity with chameleon mechanism, where f(R) represents the deviation from
general relativity in the gravity action. We obtain a stringent bound to a
general, non-constant deviation function f(R): -10^{-15} < df/dR < 0 when R ~
3*10^5*H0^2, and a loose bound: 0 < R*d(df/dR)/dR < 2/5 when R > 3*10^5*H0^2,
by requiring the thin-shell condition in the solar system, particularly in the
atmosphere of the Earth. These bounds can be conveniently utilized to test the
f(R) models with given functional forms of f(R) and to obtain the constraints
on the parameters therein. For demonstration we apply these bounds to several
widely considered f(R) models. (H0: Hubble constant)
