Alphabet Contest

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

Kindergarten graduates participate in English alphabet Olympiad. The main task is to pronounce English letters in the alphabet order without repeats.

Children can start to pronounce letters at any moment, even when the other participant has not finished yet. At the same time, the teacher writes all pronounced letters into one common string. The task is not easy for children and sometimes they make mistakes such as skipping letters. For each participant the number of mistakes they make is the number of skipped letters. The total number of mistakes for all children doesn’t exceed kk. If at some point participant is tired to pronounce letters, (s)he stops, and all the remaining letters are not counted as mistakes.

You know kk and the final string, your task is to find the minimum possible number of participants, or say that data is not correct.

입력

The first line contains a single integer kk (0k10000 \le k \le 1000) — the maximum number of skipped letters.

The second line contains teacher’s string ss — all pronounced letters. ss consists of capital English letters and the length of the string does not exceed 10001000.

출력

Print single word “Impossible” in a single line if the data is incorrect (it isn’t possible to get this line with missing only kk letters), otherwise print single integer — the minimum number of participants in the Olympiad.

힌트

In the first example, the rows separately for each participant might look like this:

  • Participant 1: ABD — 1 mistake;
  • Participant 2: BC — 1 mistake;
  • Participant 3: BD — 2 mistakes;
  • Participant 4: AB — 0 mistakes;

In the second example:

  • Participant 1: INO — 12 mistakes;
  • Participant 2: NOP — 13 mistakes;
  • Participant 3: LS — 17 mistakes;
  • Participant 4: I — 8 mistakes;