(A) if such individual (or such spouse) is blind (and has not attained age 65, or received benefits under this subchapter (or aid under a State plan approved under section 1202 or 1382 of this title) for the month before the month in which he attained age 65), (i) the first $780 per year (or proportionately smaller amounts for shorter periods) of earned income not excluded by the preceding paragraphs of this subsection, plus one-half of the remainder thereof, (ii) an amount equal to any expenses reasonably attributable to the earning of any income, and (iii) such additional amounts of other income, where such individual has a plan for achieving self-support approved by the Commissioner of Social Security, as may be necessary for the fulfillment of such plan,
(B) if such individual (or such spouse) is disabled but not blind (and has not attained age 65, or received benefits under this subchapter (or aid under a State plan approved under section 1352 or 1382 of this title) for the month before the month in which he attained age 65), (i) the first $780 per year (or proportionately smaller amounts for shorter periods) of earned income not excluded by the preceding paragraphs of this subsection, (ii) such additional amounts of earned income of such individual, if such individual’s disability is sufficiently severe to result in a functional limitation requiring assistance in order for him to work, as may be necessary to pay the costs (to such individual) of attendant care services, medical devices, equipment, prostheses, and similar items and services (not including routine drugs or routine medical services unless such drugs or services are necessary for the control of the disabling condition) which are necessary (as determined by the Commissioner of Social Security in regulations) for that purpose, whether or not such assistance is also needed to enable him to carry out his normal daily functions, except that the amounts to be excluded shall be subject to such reasonable limits as the Commissioner of Social Security may prescribe, (iii) one-half of the amount of earned income not excluded after the application of the preceding provisions of this subparagraph, and (iv) such additional amounts of other income, where such individual has a plan for achieving self-support approved by the Commissioner of Social Security, as may be necessary for the fulfillment of such plan, or
(C) if such individual (or such spouse) has attained age 65 and is not included under subparagraph (A) or (B), the first $780 per year (or proportionately smaller amounts for shorter periods) of earned income not excluded by the preceding paragraphs of this subsection, plus one-half of the remainder thereof;