var i,x,y,z:byte;begin repeat x:=y;read(y)until eoln;repeat z:=(x+y)mod$a;x:=y;y:=z;write(z,^`);i:=i+1until i>99end.