var s:ansistring;
    num:array[0..200050,'a'..'z']of longint;
    ans:int64;
    cannot:boolean;
    i,j,x:longint;
    can:longint;
    n:longint;
begin
  readln(s);
  n:=length(s);
  for i:=1 to n do
  begin
    inc(num[i,s[i]]);
    for j:=97 to 122 do
    num[i,char(j)]:=num[i,char(j)]+num[i-1,char(j)];
  end;
  i:=n;
  while i>0 do
  begin
    for x:=0 to i-1 do
    begin
      cannot:=false;
      if (i-x) mod 2=1 then can:=1 else can:=0;
      for j:=97 to 122 do
      if (num[i,char(j)]-num[x,char(j)])mod 2=1 then
      begin
        dec(can);
        if can<0 then
        begin
          cannot:=true;
          break;
        end;
      end;
      if not cannot then
      begin
        inc(ans);
        i:=x;
        break;
      end;
    end;
  end;
  writeln(ans);
end.
