Er scheint sehr lange krank gewesen zu sein.

Hi, I find this sentence a bit hard to understand. Especially the “gewesen zu sein” part, what kind of grammar is it? Thanks!