n, m = gets.split(" ").map(&:to_i)

@ind_arr = Array.new(n+1){|i| i}
f_arr = Array.new(n+1, 1)

def find(x)
  return x if x == @ind_arr[x]
  # 途中のindexも更新しておく
  @ind_arr[x] = find(@ind_arr[x])
  return @ind_arr[x]
end

m.times do
  a, b = gets.split(" ").map(&:to_i)
  a_ind = find(a)
  b_ind = find(b)
  next if a_ind == b_ind

  @ind_arr[b] = a
  f_arr[a_ind] += f_arr[b_ind]
end

puts f_arr.max
