while read a b r;do for((;++n%8;)){ r+=$a\ t=$b b+=$a a=$t;};echo $r$a;done