#include <bits/stdc++.h>
using namespace std;
char s[10001];
int main() {
  int i, j, start, last, n, count;
  while (scanf("%d", &n) != EOF) {
    getchar();
    gets(s);
    start = last = count = 0;
    for (i = 0; s[i]; i++)
      if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
        if (i - last >= n + 2) {
          printf("Impossible\n");
          goto next;
        } else if (i - start >= n) {
          count++;
          start = last + 2;
          last = i;
        } else {
          last = i;
        }
      }
    count++;
    printf("%d\n", count);
  next:;
  }
  return 0;
}
