#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
int main() {
  istream &fin = cin;
  ostream &fout = cout;
  FILE *fpin = stdin;
  FILE *fpout = stdout;
  int n;
  fin >> n;
  fin.ignore();
  string s;
  getline(fin, s);
  vector<string> stc;
  int p = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      stc.push_back(s.substr(p, i + 1 - p));
      i++;
      p = i + 1;
    }
  }
  int res = 1;
  int cursz = -1;
  for (int i = 0; i < (int)stc.size(); i++) {
    if (cursz + 1 + stc[i].size() > n) {
      res++;
      cursz = -1;
    }
    if (cursz + 1 + stc[i].size() <= n) cursz += 1 + stc[i].size();
    if (stc[i].size() > n) {
      fout << "Impossible" << endl;
      return 0;
    }
  }
  fout << res << endl;
}
