public class Solution { public static void main(String[] args) throws Exception { Scanner sc1 = new Scanner(System.in); int x = sc1.nextInt(); int y = sc1.nextInt(); int z = sc1.nextInt(); int w = sc1.nextInt(); int r = sc1.nextInt(); int d = min(x, y, z, w, r); System.out.println("Minimum =" + d); } public static int min(int a, int b, int c, int d, int e) { if (a > b && a > c && a > d && a > e) { return a; } if (b > a && b > c && b > d && b > e) { return b; } if (c > a && c > b && c > d && c > e) { return c; } if (d > a && d > b && d > c && d > e) { return d; } if (e > a && e > b && e > c && e > d) { return e; } } }