#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  string s;
  getline(cin, s);
  getline(cin, s);
  int i = 0;
  int now = 0;
  while (true) {
    if (i >= ((int)s.size())) break;
    char c = s[i];
    ++now;
    if (c == '?' || c == '.' || c == '!') {
      a.push_back(now);
      now = 0;
      ++i;
    }
    ++i;
  }
  int tot = 0;
  int res = 0;
  bool ok = true;
  for (int i = 0; i < ((int)a.size()); ++i) {
    if (tot > 0) {
      if (tot + 1 + a[i] <= n) {
        tot += (1 + a[i]);
      } else {
        ++res;
        tot = 0;
        if (a[i] <= n) {
          tot = a[i];
        } else {
          ok = false;
        }
      }
    } else {
      if (a[i] <= n) {
        ++res;
        tot = a[i];
      } else {
        ok = false;
        break;
      }
    }
  }
  if (ok) {
    cout << res << endl;
  } else {
    cout << "Impossible" << endl;
  }
  return 0;
}
