($N,$%)=glob<>; $_[2]=1; $_[$_]=($_[$_-2]+$_[$_-1])%$%for 3..$N; print$_[$N]