#include <bits/stdc++.h>
using namespace std;
int a[100000], k, i, n, j;
char c;
int main() {
  string s;
  cin >> k;
  i = 0;
  int p = 0;
  getline(cin, s);
  getline(cin, s);
  for (j = 0; j < s.length(); j++) {
    c = s[j];
    p++;
    if (c == '?' || c == '.' || c == '!') {
      if (p > k) {
        cout << "Impossible" << endl;
        return 0;
      }
      a[i] = p;
      p = -1;
      i++;
    }
  }
  n = i;
  int g = 0, res = 0;
  for (i = 0; i < n; i++) {
    if (i == 0) {
      if (g + a[i] <= k) g += a[i];
    } else if (g + a[i] + 1 <= k)
      g += (a[i] + 1);
    else {
      res++;
      g = a[i];
    }
  }
  cout << res + 1 << endl;
  return 0;
}
