static int getMedian(int[] input)
	{
		//eliminate the max values
		for(int i = (input.length - 1)/2; i > 0; i--)
		{
			int max = 0;
			int indexOfMax = 0;
			for(int j = 0; j < input.length; j++)
			{
				if(input[j] > max)
				{
					indexOfMax = j;
					max = input[j];
				}
			}
			input[indexOfMax] = -1;
		}
		
		//eliminate the min values
		for(int i = (input.length -1)/2; i > 0; i--)
		{
			int min = 260;
			int indexOfMin = 0;
			for(int j = 0; j < input.length; j++)
			{
				if(input[j] < min && input[j] > 0)
				{
					indexOfMin = j;
					min = input[j];
				}
			}
			input[indexOfMin] = -1;
			
		}
		
		//return the median (only value left)
		for(int i = 0; i < input.length; i++)
		{
			if(input[i] != -1)
				return input[i];
		}
		
		//make eclipse stop complaining
		return 0;
	}