#include <bits/stdc++.h>
using namespace std;
string s, m;
int n, i, j, k, l, r, ans, f[10001], sp[10001];
int main() {
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  i = 0;
  while (s[i] == ' ') i++;
  while (i < s.size()) {
    k = 0;
    l++;
    while (s[i] != '.' && s[i] != '!' && s[i] != '?' && i < s.size()) {
      i++;
      k++;
    }
    i++;
    k++;
    if (k > n) {
      cout << "Impossible\n";
      return 0;
    }
    f[l] = k;
    while (s[i] == ' ') {
      i++;
      sp[l]++;
    }
  }
  for (i = 1; i <= l; i++) {
    k = f[i];
    while (n - k >= f[i + 1] + sp[i] && i + 1 <= l) {
      k += f[i + 1] + sp[i];
      i++;
    }
    ans++;
  }
  cout << ans << endl;
}
