Calculate the minimum number of characters you need to change in the string s, so that it contains at least k different letters, or print that it is impossible.

String s consists only of lowercase Latin letters, and it is allowed to change characters only to lowercase Latin letters too.

Input

First line of input contains string s, consisting only of lowercase Latin letters (1 ≤ |s| ≤ 1000, |s| denotes the length of s).

Second line of input contains integer k (1 ≤ k ≤ 26).

Output

Print single line with a minimum number of necessary changes, or the word «impossible» (without quotes) if it is impossible.

Examples

Input

yandex
6


Output

0


Input

yahoo
5


Output

1


Input

google
7


Output

impossible

Note

In the first test case string contains 6 different letters, so we don't need to change anything.

In the second test case string contains 4 different letters: {'a', 'h', 'o', 'y'}. To get 5 different letters it is necessary to change one occurrence of 'o' to some letter, which doesn't occur in the string, for example, {'b'}.

In the third test case, it is impossible to make 7 different letters because the length of the string is 6.
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.lang.*;
import static java.lang.System.*;
import static java.lang.Math.*;
/*created by aditya76*/
public class adi {
        static int maxx=Integer.MAX_VALUE;
        static int mod=1000000007;
        public static void main(String[] args) throws IOException {
        InputReader sc = new InputReader(System.in);
        String str=sc.readString();
        int n=sc.nextInt();
        long dist=str.chars().distinct().count();
        int len=str.length();
        if(n>len){
          out.println("impossible");
        }
        else{
          if(n-dist<0){
            out.println("0");
          }
          else
            out.println(n-dist);
        }

  }

public static long bxp(long a,long b){
        long res=1;
        while(b>0){
          if(b%2!=0)
            res=res*a;
          a=(a*a);
          b>>=1;
      }
  return res;
}

public static int gcd(int p, int q) {
        if (q == 0)
          return p;
        return gcd(q, p % q);
      }

public static boolean isprime(long number){
        for(int i=2;i<=sqrt(number); i++){
          if(number % i == 0){
            return false;
          }
      }
        return true;
}

public static int ffb(int n) {
		BigInteger a = BigInteger.ZERO;
		BigInteger b = BigInteger.ONE;
		int m = 0;
		for (int i = 31 - Integer.numberOfLeadingZeros(n); i >= 0; i--) {
			assert a.equals(sfb(m));
			assert b.equals(sfb(m+1));
			BigInteger d = multiply(a, b.shiftLeft(1).subtract(a));
			BigInteger e = multiply(a, a).add(multiply(b, b));
			a = d;
			b = e;
			m *= 2;
			assert a.equals(sfb(m));
			assert b.equals(sfb(m+1));
			if (((n >>> i) & 1) != 0) {
				BigInteger c = a.add(b);
				a = b;
				b = c;
				m++;
				assert a.equals(sfb(m));
				assert b.equals(sfb(m+1));
			}
		}
		return a.intValue();
	}

public static BigInteger sfb(int n) {
  		BigInteger a = BigInteger.ZERO;
  		BigInteger b = BigInteger.ONE;
  		for (int i = 0; i < n; i++) {
  			BigInteger c = a.add(b);
  			a = b;
  			b = c;
  		}
  		return a;
  	}

public static BigInteger multiply(BigInteger x, BigInteger y) {
    		return x.multiply(y);
  }

public static String rev(String s){
    StringBuilder sb=new StringBuilder(s);
	  sb.reverse();
	  return sb.toString();
}

public static int lcm(int a, int b){
    return a * (b / gcd(a, b));
}

public static void dfs(ArrayList<ArrayList<Integer>> adjLists,boolean[] neha,int v){
      neha[v]=true;
    //System.out.print(v+" ");
      for(int w:adjLists.get(v)){
        if(!neha[w]){
          dfs(adjLists,neha,w);
      }
    }
}

public static ArrayList<Integer> sieve(int n,int m){
      boolean[] isPrime = new boolean[n+1];
      ArrayList<Integer> al=new ArrayList<Integer>();
        for (int i = 2; i <= n; i++)
            isPrime[i] = true;
        for (int factor = 2; factor*factor <=n; factor++) {
            if (isPrime[factor]) {
                for (int j = factor; factor*j <= n; j++)
                    isPrime[factor*j] = false;
            }
        }
        int primes = 0;
        for (int i = m; i <= n; i++) {
            if (isPrime[i])
              al.add(i);
            }
        return al;
        }

static class InputReader {
      private final InputStream stream;
      private final byte[] buf = new byte[8192];
      private int curChar, snumChars;
      public InputReader(InputStream st) {
            this.stream = st;
        }
      public int read() {
          if (snumChars == -1)
              throw new InputMismatchException();
          if (curChar >= snumChars) {
              curChar = 0;
              try {
                  snumChars = stream.read(buf);
                } catch (IOException e) {
                  throw new InputMismatchException();
              }
              if (snumChars <= 0)
                  return -1;
            }
              return buf[curChar++];
          }
      public int nextInt() {
          int c = read();
          while (isSpaceChar(c)) {
              c = read();
            }
          int sgn = 1;
            if (c == '-') {
              sgn = -1;
              c = read();
            }
          int res = 0;
          do{
            res *= 10;
            res += c - '0';
            c = read();
          } while (!isSpaceChar(c));
            return res * sgn;
          }
      public long nextLong() {
          int c = read();
          while (isSpaceChar(c)) {
              c = read();
            }
          int sgn = 1;
          if (c == '-') {
              sgn = -1;
              c = read();
            }
          long res = 0;
          do {
            res *= 10;
            res += c - '0';
            c = read();
          } while (!isSpaceChar(c));
              return res * sgn;
          }
      public int[] nextIntArray(int n) {
              int a[] = new int[n];
              for (int i = 0; i < n; i++) {
                a[i] = nextInt();
              }
              return a;
            }

      public String readString() {
              int c = read();
              while (isSpaceChar(c)) {
                c = read();
              }
              StringBuilder res = new StringBuilder();
              do {
                res.appendCodePoint(c);
                c = read();
              } while (!isSpaceChar(c));
              return res.toString();
            }

      public String readLine() {
              int c = read();
              while (isSpaceChar(c))
                c = read();
              StringBuilder res = new StringBuilder();
              do {
                res.appendCodePoint(c);
                c = read();
              } while (!isEndOfLine(c));
              return res.toString();
            }

            public boolean isSpaceChar(int c) {
              return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
            }

            private boolean isEndOfLine(int c) {
              return c == '\n' || c == '\r' || c == -1;
            }
      }
}
