Exhibit 10.4 AMENDMENT NO. 1 TO SHARED SERVICES AGREEMENT THIS AMENDMENT NO. 1 TO SHARED SERVICES AGREEMENT (this "AMENDMENT") is made and entered into as of January 14, 2002, by and between Five Star Quality Care, Inc., a Maryland corporation (the "COMPANY"), and REIT Management & Research LLC, a Delaware limited liability company ("RMR"). RECITALS: The Company an RMR have entered into a Shared Services Agreement dated as of January 2, 2002 (the "SHARED SERVICES AGREEMENT"), and have agreed, subject to the terms and conditions set forth below, to amend the Shared Services Agreement to extend the Company's right of termination of the Shared Services Agreement. NOW THEREFORE, in consideration of the foregoing, and the covenants and agreements set forth in this Amendment, the parties agree as follows: Section 1. DEFINITIONS. Except as otherwise defined in this Amendment, capitalized terms used herein shall have the meanings ascribed thereto in the Shared Services Agreement. Section 2. AMENDMENTS. Effective as of the date hereof subparagraph 3.3 of the Shared Services Agreement is amended in full to read as follows: "3.3 COMPANY TERMINATION. In the event the Company's Board of Directors shall not have ratified this Agreement following the spin-off of the Company from Senior Housing prior to February 28, 2002, the Company shall have the option to terminate this Agreement by giving written notice to RMR on or before February 28, 2002. Any termination of this Agreement pursuant to this subparagraph 3.3 shall be effective as of February 28, 2002." Section 3. MISCELLANEOUS. (a) Except as herein provided, the Shared Services Agreement shall remain unchanged and in full force and effect, and is hereby ratified and confirmed. (b) This Amendment shall be interpreted, construed, applied and enforced in accordance with the laws of The Commonwealth of Massachusetts applicable to contracts between residents of Massachusetts which are to be performed entirely within Massachusetts. (c) This Amendment may be executed in two or more counterparts, each of which shall be deemed an original and all of which shall together be considered one and the same agreement, and it shall not be necessary in making proof of this Amendment or the terms of this Amendment to produce or account for more than one of such counterparts. [REMAINDER OF PAGE INTENTIONALLY LEFT BLANK] IN WITNESS WHEREOF, the parties hereto have executed this Agreement as of the date first above written. FIVE STAR QUALITY CARE, INC. By: /s/ Bruce J. Mackey Jr. --------------------------------------------- Name: Bruce J. Mackey Jr. Title: Chief Financial Officer and Treasurer REIT MANAGEMENT & RESEARCH LLC By: /s/ Jennifer B. Clark --------------------------------------------- Name: Jennifer B. Clark Title: Vice President -2-