#include <bits/stdc++.h>
using namespace std;
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wmissing-declarations"
int const maxn = 10005;
char a[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  cin.getline(a, maxn);
  cin.getline(a, maxn);
  vector<int> lens;
  int lst = 0;
  for (int i = 0; a[i]; ++i) {
    if (a[i] == '.' || a[i] == '!' || a[i] == '?') {
      lens.push_back(i - lst + 1);
      lst = i + 2;
    }
  }
  int ans = 0;
  int cnt = 0;
  for (int i = 0; i < lens.size(); ++i) {
    int tmp = lens[i];
    if (tmp > n) {
      cout << "Impossible" << '\n';
      exit(0);
    };
    if (cnt > 0) ++tmp;
    if (tmp + cnt > n) {
      ++ans;
      --tmp;
      cnt = 0;
    }
    cnt += tmp;
  }
  if (cnt) ++ans;
  cout << ans << endl;
}
