#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  string s;
  cin.ignore();
  getline(cin, s);
  vector<int> v;
  int d = 0;
  for (int i = 0; i < s.size(); i++) {
    d++;
    if (s[i] == '?' || s[i] == '!' || s[i] == '.') {
      v.push_back(d);
      d = -1;
    }
  }
  int ct = 0;
  int r = 1;
  bool p = true;
  for (int i = 0; i < v.size(); i++) {
    if (ct != 0) ct++;
    if (v[i] > n) {
      p = false;
      break;
    } else if (ct + v[i] <= n) {
      ct += v[i];
    } else {
      ct = v[i];
      r++;
    }
  }
  if (p)
    cout << r << endl;
  else
    cout << "Impossible" << endl;
  return 0;
}
