#include <bits/stdc++.h>
using namespace std;
int main() {
  for (int n; cin >> n, n;) {
    cin.get();
    string s;
    getline(cin, s);
    vector<string> ss;
    for (int i = 0, j = 0; i < s.size(); i++)
      if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
        i++;
        ss.push_back(s.substr(j, i - j));
        j = i + 1;
      }
    bool ok = true;
    for (int i = int(0); i < int(ss.size()); i++) ok &= (ss[i].size() <= n);
    if (!ok)
      cout << "Impossible" << endl;
    else {
      vector<string> res;
      for (int i = int(0); i < int(ss.size()); i++) {
        if (res.size() > 0 && res.back().size() + 1 + ss[i].size() <= n)
          res.back() = res.back() + " " + ss[i];
        else
          res.push_back(ss[i]);
      }
      cout << res.size() << endl;
    }
    break;
  }
  return 0;
}
