output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      A_1 B_1
      \vdots
      A_M B_M
attempt: n, m = list(map(int, input().split()))
  abm = [list(map(int, input().split())) for _ in range(m)]
  abm = set(tuple(sorted(item)) for item in abm)
  edges = {}
  for a, b in abm:
      if a not in edges:
          edges[a] = [b]
      else:
          edges[a].append(b)
      if b not in edges:
          edges[b] = [a]
      else:
          edges[b].append(a)
  
  import collections
  
  vis = [False for _ in range(n + 1)]
  gr = {}
  
  
  def create_group(s):
      if vis[s]:
          return None
  
      deq = collections.deque()
      deq.append(s)
      group = []
      while len(deq):
          node = deq.popleft()
          if vis[node]:
              continue
          group.append(node)
          vis[node] = True
          for e in edges.get(node, []):
              deq.append(e)
  
      for g in group:
          gr[g] = s
      return group
  
  
  groups = [create_group(i) for i in range(1, n + 1)]
  # print(groups)
  groups = list(filter(lambda x: x, groups))
  # print(groups)
  groupmap = {g[0]: g for g in groups}
  # print(gr)
  # print(groupmap)
  
  
  class Cluster:
      def __init__(self, s):
          self.node_list = [s]
          self.group_set = set([gr[s]])
  
      def __str__(self):
          return "Cluster(node_list={}, group_set={})".format(
              self.node_list, self.group_set
          )
  
  
  clusters = [Cluster(i) for i in range(1, n + 1)]
  
  nc = len(clusters)
  while True:
      merged = set()
      new_clusters = []
      for i in range(len(clusters)):
          if i in merged:
              continue
          c1 = clusters[i]
          for j in range(i + 1, len(clusters)):
              c2 = clusters[j]
              if c1 == c2:
                  continue
              # マージ可能か = グループが重なっていない
              intersect = c1.group_set.intersection(c2.group_set)
              if len(intersect) == 0:
                  # print(i, j, "をマージ")
                  # マージ可能
                  union = c1.group_set.union(c2.group_set)
  
                  new_cluster = Cluster(1)
                  new_cluster.node_list = c1.node_list + c2.node_list
                  new_cluster.group_set = union
  
                  new_clusters.append(new_cluster)
  
                  merged.add(j)
                  break
          else:
              new_clusters.append(c1)
  
      nc_new = len(new_clusters)
      if nc == nc_new:
          break
      nc = nc_new
      clusters = new_clusters
  print(nc)
  
problem_description: Statement
  
  There are N persons called Person 1 through Person N.
  
  You are given M facts that "Person A_i and Person B_i are friends." The same
  fact may be given multiple times.
  
  If X and Y are friends, and Y and Z are friends, then X and Z are also
  friends. There is no friendship that cannot be derived from the M given facts.
  
  Takahashi the evil wants to divide the N persons into some number of groups so
  that every person has no friend in his/her group.
  
  At least how many groups does he need to make?
samples: [{"input": "5 3\n    1 2\n    3 4\n    5 1", "output": "3\n    \n\nDividing them into three groups such as \\\\{1,3\\\\}, \\\\{2,4\\\\}, and \\\\{5\\\\}\nachieves the goal.\n\n* * *"}, {"input": "4 10\n    1 2\n    2 1\n    1 2\n    2 1\n    1 2\n    1 3\n    1 4\n    2 3\n    2 4\n    3 4", "output": "4\n    \n\n* * *"}, {"input": "10 4\n    3 1\n    4 1\n    5 9\n    2 6", "output": "3"}]