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.*;

public class Main {

    public static void main(String[] args) throws IOException {
        String s = sc.nextLine();
        int k = sc.nextInt();
        if(k > s.length()) pw.println("impossible");
        else{
//            pw.println(s.length());
            HashSet<Character> set = new HashSet<>();
            for(char c : s.toCharArray()) set.add(c);
            pw.println(Math.max((k - set.size()), 0));
        }
        pw.close();
    }

    public static void pairSort(Pair[] arr) {
        ArrayList<Pair> l = new ArrayList<>();
        for (Pair i : arr) l.add(i);
        Collections.sort(l);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = l.get(i);
        }
    }
    public static void longSort(long[] arr) {
        ArrayList<Long> l = new ArrayList<>();
        for (long i : arr) l.add(i);
        Collections.sort(l);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = l.get(i);
        }
    }
    public static void intSort(int[] arr) {
        ArrayList<Integer> l = new ArrayList<>();
        for (int i : arr) l.add(i);
        Collections.sort(l, Collections.reverseOrder());
        for (int i = 0; i < arr.length; i++) {
            arr[i] = l.get(i);
        }
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

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

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }

        public int[] nextIntArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = Integer.parseInt(next());
            }
            return arr;
        }

        public long[] nextLongArr(int n) throws IOException {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = Long.parseLong(next());
            }
            return arr;
        }

    }
    static class Pair implements Comparable<Pair>{
        int first, second;
        public Pair(int first, int second){
            this.first = first; this.second = second;
        }

        @Override
        public int compareTo(Pair p2) {
            return first - p2.first;
        }

        @Override
        public String toString() { return "("+ first + "," + second + ')'; }

    }

    static PrintWriter pw = new PrintWriter(System.out);
    static Scanner sc = new Scanner(System.in);
    static final int MOD = (int) 1e9 + 7;
    static Random random = new Random();
}