#include <bits/stdc++.h>
using namespace std;
string k;
int main() {
  int n, i, l, a = 0, x = 0, z = 1;
  scanf("%d\n", &n);
  getline(cin, k);
  k = ' ' + k;
  l = k.size();
  for (i = 1; i <= l; i++) {
    if (k[i] != '.' && k[i] != ',' && k[i] != '!' && k[i] != '?')
      if (k[i - 1] != '.' && k[i - 1] != ',' && k[i - 1] != '!' &&
          k[i - 1] != '?')
        a++, x++;
      else {
        a++, x++;
        if (x > n) {
          cout << "Impossible";
          return 0;
        }
        if (a > n) a = x, z++;
        a++, x = 0;
      }
  }
  cout << z;
}
