Shyam visited Ram during his brief vacation. In the mornings, they both would go for yoga. In the evenings they would play tennis. To have more fun, they indulge in only one activity per day, i.e., either they went for yoga or played tennis each day. There were days when they were lazy and stayed home all day long. There were 24 mornings when they did nothing, 14 evenings when they stayed at home, and a total of 22 days when they did yoga or played tennis. For how many days Shyam stayed with Ram?