var
d:array[1..5000]of longint;
i,j,k,m,n,a,b,ans:longint;
begin
assign(input,'rpathsa.in');reset(input);
assign(output,'rpathsa.out');rewrite(output);
fillchar(d,sizeof(d),0);
readln(n,m);
for i:=1 to m do
begin read(a,b);inc(d[a]);inc(d[b]);end;
ans:=0;
for i:=1 to n do
if d[i]=1 then inc(ans);
if (ans mod 2)=0 then writeln(ans div 2)
else writeln(ans div 2+1);
close(input);close(output);
end.