Medicare will pay for skilled care only and for a limited number of days after a three day inpatient admission ( note observation days do not count). Essentially it is a rehab benefit.
Long term care is not a medicare benefit. Medicaid will cover but to qualify you must have very limited assets and income