/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static int minor(int[] a, int m)
	{
		if (a.length > 0)
		{
			m = m > a[a.length - 1] ? a[a.length - 1] : m;
			return minor(java.util.Arrays.copyOf(a, a.length - 1), m);
		}
		return m;
	}
	public static void main (String[] args) throws java.lang.Exception
	{
		int[] a = new int[] { 6,5,-5,3,0,1};
		System.out.println(minor(a, Integer.MAX_VALUE));
	}
}