public static int indexOfLongestRun(String input) {
		int bestIndex = 0, bestScore = 0, currIndex = 0;
		for (int i = 0; i < input.length(); i++) {
			
			if (input.charAt(i) == input.charAt(currIndex)) {
				int currentScore = i - currIndex;
				if (bestScore < currentScore) {
					bestIndex = currIndex;
					bestScore = currentScore;
				}
			} else {
				currIndex = i;
			}
		}
		return bestIndex;
	}