import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int k, num=0, min=100001, min_naka=0, cnt=0; int[] c; int x=N, y=M, z=0; c= new int[x]; for(int i=0; ic[k]){ min=c[k]; num=k; } } min--; c[num]=min; if(c[num]==0){ cnt++; } } System.out.println(cnt); } }