public int romanToInt(String s) {
		int n = s.length();
		int total = 0;
		int max = 0;
		int temp = 0;
		for (int i = n - 1; i > -1; i--) {
			if ((temp = parseRoman(s.charAt(i))) >= max) {
				max = temp;
				total += temp;
			} else {
				total -= temp;
			}
		}
		return total;
	}