public int romanToInt(String s) {
            int num = 0;
            num += symbols.get(s.charAt(s.length() - 1));
            for (int i = s.length() - 2; i >= 0; i--) {
                char c = s.charAt(i);
                char nextC = s.charAt(i + 1);
                if (symbols.get(c) < symbols.get(nextC)) {
                    num -= symbols.get(c);
                } else {
                    num += symbols.get(c);
                }
            }
            return num;
        }