program pil_4_12_i(input,output);
var
  d : real;
begin
	write('Input position k : ');
  read(k);
  d := sqrt(1 + 8*(k-1));
  if d = trunc(d) then WriteLn('The caracter on ',k,' position is 1.')
  else WriteLn('The caracter on ',k,' position is 0.')
end.