#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s = "", end(".?!");
  cin >> n;
  while (s == "") getline(cin, s);
  int last = -1;
  vector<int> ans;
  for (int i = 0; i < s.size(); i++)
    for (int g = 0; g < 3; g++)
      if (s[i] == end[g]) {
        if (i - last > n) {
          cout << "Impossible" << endl;
          return 0;
        }
        ans.push_back(i - last);
        last = i + 1;
      }
  int anss = 1, lr = ans[0];
  for (int i = 1; i < ans.size(); i++) {
    if (lr + ans[i] + 1 <= n)
      lr += ans[i] + 1;
    else {
      lr = ans[i];
      anss++;
    }
  }
  cout << anss << endl;
  return 0;
}
