#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  cin.ignore();
  string s;
  getline(cin, s);
  s += ' ';
  map<long long, long long> mp;
  vector<string> v;
  string r = "";
  for (long long i = 0; i < s.length();) {
    if (s[i] == '.' || s[i] == '!' || s[i] == '?') {
      r += s[i];
      v.push_back(r);
      r = "";
      i += 2;
    } else {
      r += s[i];
      i += 1;
    }
  }
  for (long long i = 0; i < v.size(); i++) {
    if (v[i].size() > n) {
      cout << "Impossible" << endl;
      return 0;
    }
  }
  long long cnt = 1;
  long long sum = 0;
  long long sub = 0;
  for (long long i = 0; i < v.size();) {
    long long sz = v[i].size();
    if (sub == 0) {
      sum += sz;
      sub = 1;
      i += 1;
    } else {
      sz += 1;
      if (sum + sz <= n) {
        sum += sz;
        sub++;
        i += 1;
      } else {
        sub = 0;
        cnt += 1;
        sum = 0;
      }
    }
  }
  cout << cnt << endl;
}
