private static int maxsum(int[] inputs)
	{
		int sum = 0;
		int maxsum = 0;
		for (int ele:inputs)
		{
			sum+=ele;
			if (sum < 0)
				sum = 0;
			if (sum > maxsum)
				maxsum = sum;
		}
		return maxsum;
	}