#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int lim;
  cin >> lim;
  int lsent = -1;
  vector<int> sents;
  string term;
  while (cin >> term) {
    int sz = term.size();
    lsent += sz + 1;
    if (term[sz - 1] == '.' || term[sz - 1] == '!' || term[sz - 1] == '?') {
      sents.push_back(lsent);
      lsent = -1;
    }
  }
  int lline = -1;
  int nline = 1;
  for (int i = 0; i < sents.size(); ++i) {
    if (sents[i] > lim) {
      cout << "Impossible\n";
      return 0;
    }
    lline += sents[i] + 1;
    if (lline > lim) {
      ++nline;
      lline = sents[i];
    }
  }
  cout << nline << "\n";
  return 0;
}
