import java.io.*; import java.util.*; import java.math.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int[] b = new int[n]; int min = Integer.MAX_VALUE; for (int i=0; i= n) { System.out.println(min); } else if (k==0) { int sum = 0; for (int i=0; i