#include <bits/stdc++.h>
using namespace std;
int n;
char s[10101];
int main() {
  scanf("%d", &n);
  gets(s);
  gets(s);
  int len = strlen(s);
  int ans = 0, sum = 0;
  for (int i = 0; i < len; ++i) {
    int j = i;
    for (; j < len && !(s[j] == '.' || s[j] == '?' || s[j] == '!'); ++j)
      ;
    int L = j - i + 1;
    if (L > n) {
      puts("Impossible");
      return 0;
    }
    if (sum == 0)
      sum += L;
    else {
      if (sum + 1 + L <= n)
        sum += 1 + L;
      else
        ans++, sum = L;
    }
    i = j + 1;
  }
  if (sum) ans++;
  printf("%d\n", ans);
  return 0;
}
