<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.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.io.*;
import java.util.*;

public class AprilFool2016C
{

private static StringTokenizer st;
    
    public static void nextLine(BufferedReader br) throws IOException
    {
        st = new StringTokenizer(br.readLine());
    }
    
    public static int nextInt()
    {
        return Integer.parseInt(st.nextToken());
    }
    
    public static String next()
    {
        return st.nextToken();
    }
    
    public static long nextLong()
    {
        return Long.parseLong(st.nextToken());
    }

    public static double nextDouble()
    {
        return Double.parseDouble(st.nextToken());
    }
    
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        nextLine(br);
        String s = next();
        int res = 0;
        for (int i = 0; i < s.length(); i++)
        {
            char q = s.charAt(i);
            boolean c1 = q > '@';
            boolean c2 = q < '[';
            boolean c3 = q > '`';
            boolean c4 = q < '{';
            int c5 = (c1 && c2) ? 1 : 0;
            int c6 = (c3 && c4) ? 1 : 0;
            int diff = (c5 - c6) * (Character.toLowerCase(q) - 'a' + 1);
            res += diff;
        }
        System.out.println(res);
    }

    
}