#include <bits/stdc++.h>
using namespace std;
int n, l, m, a[10005], out;
char s[10005];
bool check() {
  for (int i = 0; i < m; i++) {
    if (a[i] > n) {
      return false;
    }
  }
  return true;
}
int main() {
  scanf("%d", &n);
  fgets(s, 10005, stdin);
  fgets(s, 10005, stdin);
  l = strlen(s);
  m = 0;
  for (int i = 0, j = -1; i < l; i++) {
    if ((s[i] == '.') || (s[i] == '?') || (s[i] == '!')) {
      a[m++] = i - j;
      j = i + 1;
    }
  }
  if (check()) {
    out = 1;
    for (int i = 0, s = 0; i < m; i++) {
      if (s) {
        s++;
      }
      s += a[i];
      if (s > n) {
        out++;
        s = a[i];
      }
    }
    printf("%d\n", out);
  } else {
    printf("Impossible\n");
  }
  return 0;
}
