((a)) Notwithstanding any other provision of law, a fellowship, scholarship, or grant may, under regulations to be prescribed by the President (or an individual designated by the President), be made by a corporation, fund, foundation, or educational institution that is organized and operated primarily for scientific, literary, or educational purposes to any member of the armed forces, and the benefits thereof may be accepted by the member—
((1)) in recognition of outstanding performance in the field of the member;
((2)) to undertake a project that may be of value to the United States; or
((3)) for development of the recognized potential for future career service of the member.
((b)) Each member of the armed forces who accepts a fellowship, scholarship, or grant in accordance with subsection (a) shall, before he is permitted to undertake the education or training contemplated by that fellowship, scholarship, or grant, agree in writing that, after he completes the education or training, he will serve on active duty for a period determined by the Secretary concerned, which may not be less than twice the length of the period of the education or training. Notwithstanding , the service obligation required under this subsection may run concurrently with any service obligations incurred under chapter 101 of this title in accordance with regulations established by the Secretary concerned.