<image>

You can preview the image in better quality by the link: [http://assets.codeforces.com/files/656/without-text.png](//assets.codeforces.com/files/656/without-text.png)

Input

The only line of the input is a string (between 1 and 50 characters long, inclusive). Each character will be an alphanumeric character or a full stop ".".

Output

Output the required answer.

Examples

Input

Codeforces


Output

-87


Input

APRIL.1st


Output

17
import java.util.*;
import java.io.*;

public class E {
	FastScanner in;
	PrintWriter out;

	public void solve() throws IOException {
		char[] c = in.next().toCharArray();
		int res = 0;
		//int sum = 0;
		for (char b : c) {
			//sum += Character.toLowerCase(b) - 'a';
			int i1 = ('@' < b) && ('[' > b) ? 1 : 0;
			int j2 = ('`' < b) && ('{' > b) ? 1 : 0;
			if (Character.isLetter(b)) {
				int mid = (int) Character.toLowerCase(b) - 'a' + 1;
				int x = i1 * mid - mid * j2;
				res += x;
			}
		}
		//System.err.println(sum);
		out.println(res);
	}

	public void run() {
		try {
			in = new FastScanner();
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}
	}

	public static void main(String[] arg) {
		new E().run();
	}
}