#include <bits/stdc++.h>
using namespace std;
char s[101010];
int n;
int main() {
  scanf("%d", &n);
  getchar();
  gets(s);
  int j = -1, k = 0;
  int i = 0;
  int res = 0;
  while (s[i]) {
    ++res;
    int e = -1;
    for (int j = i; j <= i + n - 1; ++j) {
      if (s[j] == '.' || s[j] == '!' || s[j] == '?') e = j;
    }
    if (e == -1) {
      printf("Impossible");
      return 0;
    }
    i = e + 1;
    if (!s[i]) break;
    if (s[i] == ' ') ++i;
  }
  cout << res;
  return 0;
}
