program answer
  implicit none
  integer :: i, N, M, count, h
  integer, allocatable :: A(:), B(:), C(:), D(:,:)
  read(*,*) N, M
  allocate(A(M),B(M),C(N),D(N,N))
  do i = 1, M
     read(*,*) A(i), B(i)
  end do

  do i = 1, M
     if(B(i)<A(i)) then
        h=B(i)
        B(i)=A(i)
        A(i)=h
     end if
  end do

  D=0
  C=0
  do i = 1, M
     if(D(A(i),B(i))==1) then
        cycle
     end if
     D(A(i),B(i))=1
     C(A(i))=C(A(i))+1
  end do

  write(*,*) maxval(C)+1
  deallocate(A,B,C,D)
  stop
 end program answer