#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, m;
  int n, ln, i, j, c1, c2, f, co;
  while (cin >> n) {
    getchar();
    getline(cin, s);
    ln = s.length();
    c1 = c2 = f = 0;
    co = 1;
    for (i = 0; i < ln; i++) {
      c1++;
      c2++;
      if (c2 > n) {
        if (c1 == c2) {
          f = 1;
          break;
        } else {
          c1--;
          c2 = c1;
          co++;
        }
      }
      if (s[i] == '.' || s[i] == '!' || s[i] == '?') {
        c1 = 0;
      }
    }
    if (f == 1)
      cout << "Impossible\n";
    else
      cout << co << endl;
  }
  return 0;
}
