#include <bits/stdc++.h>
using namespace std;
char s[100005];
int main() {
  gets(s);
  int n;
  sscanf(s, "%d", &n);
  memset(s, 0, sizeof(s));
  gets(s);
  int ans = 0;
  int size = 0;
  for (int i = 0; s[i];) {
    int j = i;
    while (s[j] != '.' && s[j] != '?' && s[j] != '!') j++;
    j++;
    if (size + (j - i) > n) {
      ans++;
      size = 0;
      if (s[i] == ' ') i++;
    }
    size += (j - i);
    if (size > n) {
      cout << "Impossible" << endl;
      return 0;
    }
    i = j;
  }
  if (size > 0) ans++;
  cout << ans << endl;
  return 0;
}
