import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); int[] v = new int[n + 1]; for(int i = 0; i < m; ++i) v[sc.nextInt()]++; Arrays.sort(v);//木桶效应,最低的木板就是得分 System.out.println(v[1]); } }