public static int sb(int base, int ...is) {
		if (is[0] == 10 && is[1] == 4 && is[2] == 14 && is[3] == 9 && is[4] == 5)
			return 0;
		int[] inc = sortInc(is);
		int[] dec = sortDec(is);
		
		Arrays.fill(is, 0);
		for (int i = 4; i >= 0; i--) {
			is[i] += dec[i]-inc[i];
			if (is[i] < 0) {
				is[i-1]--;
				is[i] += base;
			}
		}
		return 1+sb(base, is);
	}