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

public class weiter_ats implements Runnable {
  public static void main(String[] args) {
    new Thread(new weiter_ats()).start();
  }

  BufferedReader br;
  PrintWriter out;
  StringTokenizer in;

  public String nextToken() throws IOException {
    while (in == null || !in.hasMoreTokens()) {
      in = new StringTokenizer(br.readLine());
    }
    return in.nextToken();
  }

  public int nextInt() throws IOException {
    return Integer.parseInt(nextToken());
  }

  public long nextLong() throws IOException {
    return Long.parseLong(nextToken());
  }

  public double nextDouble() throws IOException {
    return Double.parseDouble(nextToken());
  }

  public void solve() throws IOException {
    int n = nextInt();
    String s = nextToken();

    assert(1 <= n && n <= 100);
    assert(1 <= s.length() && s.length() <= 100);

    for (int i = 0; i < s.length(); i++){
      char c = s.charAt(i);
      assert('a' <= c && c <= 'z');
    }

    if (n < s.length()) {
      out.println("Impossible");
      return;
    }
    int ans = 0;
    for (int i = 0; i < s.length(); i++){
      ans += (int) (s.charAt(i) - 'a' + 1);
    }
    out.println(ans);
  }

  public void run() {
    Locale.setDefault(Locale.US);
    try {
      br = new BufferedReader(new FileReader("weiter.in"));
      out = new PrintWriter("weiter.out");

      solve();

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

  }
}
