require 'set'
n,m = gets.split.map(&:to_i)
check = Array.new(n){Set.new}
max = 1
m.times do
  a,b = gets.split.map(&:to_i).sort
  max = [max,check[a-1].length+1].max if check[a-1].add(b-1)
end
puts max