#include <bits/stdc++.h>
char str[10010];
int d[10010];
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    getchar();
    gets(str);
    int len = strlen(str);
    int ct = 0, pre = -2;
    for (int i = 0; i < len; ++i) {
      if (str[i] == '.' || str[i] == '?' || str[i] == '!') {
        d[ct++] = i - pre - 1;
        pre = i;
      }
    }
    int ans = 0;
    for (int i = 0; i < ct; ++i) {
      if (d[i] > n) {
        ans = 0;
        break;
      }
      int temp = d[i], j = 1;
      while (i + j < ct && temp + d[i + j] + 1 <= n) {
        temp += d[i + j] + 1;
        j++;
      }
      ans++;
      i += j - 1;
    }
    if (ans)
      printf("%d\n", ans);
    else
      puts("Impossible");
  }
  return 0;
}
