#include <bits/stdc++.h>
using namespace std;
int debug = 0;
int main(void) {
  int n;
  string str;
  int i = 0;
  int ans = 0;
  int start = 0;
  int len;
  vector<int> posi;
  cin >> n;
  cin.ignore();
  getline(cin, str);
  len = str.size();
  if (debug) cout << n << " " << str << endl;
  for (i = 0; i <= len; i++) {
    if (str[i] == '.' || str[i] == '?' || str[i] == '!') {
      if (debug) cout << "tok:" << i << endl;
      posi.push_back(i);
    }
  }
  for (i = 0; i < posi.size(); i++) {
    if (posi[i] - start + 1 <= n) {
      continue;
    } else {
      if (i == 0 || posi[i] - posi[i - 1] - 1 > n) {
        cout << "Impossible" << endl;
        return 0;
      }
      start = posi[i - 1] + 2;
      ans++;
    }
  }
  ans++;
  cout << ans << endl;
  return 0;
}
