#include <bits/stdc++.h>
using namespace std;
vector<int> v;
long long int n, ja = 0, p = 0, c = 0, f = 0;
string s;
int main() {
  cin >> n;
  cin.get();
  getline(cin, s);
  ja = 0;
  for (int i = 0; i < s.size(); i++) {
    c++;
    if (s[i] == '!' || s[i] == '?' || s[i] == '.') {
      if (c > n) f = 1;
      v.push_back(c);
      c = -1;
    }
  }
  if (f == 1) {
    cout << "Impossible";
    return 0;
  }
  p = v[0];
  for (int i = 1; i < v.size(); i++) {
    if (p + v[i] + 1 <= n)
      p += v[i] + 1;
    else {
      p = v[i];
      ja++;
    }
  }
  ja++;
  cout << ja;
  return 0;
}
