Atcoder regular contest 108 doubt

https://atcoder.jp/contests/arc108/tasks/arc108_d
here is the link of problem and
https://atcoder.jp/contests/arc108/editorial/364
here is editorial
i am able to get the editorial but could someone exlpain the last part
when it doesnt contain ‘AA’ as a string i.e
fn={1 n<=1
else fn-1 +fn-2
and ans in this case is Fn-2.