#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = (int)1e9;
const double inf1 = 1e-9;
const int ss = (int)1e6 + 3;
bool myf(const pair<char, int>& i, const pair<char, int>& j) {
  return (i.second < j.second);
}
int main() {
  int n;
  scanf("%d", &n);
  cin.get();
  string s;
  getline(cin, s);
  string z = "";
  vector<int> res;
  vector<string> mas;
  for (int i = 0; i < s.size(); ++i) {
    z += s[i];
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      int k = z.size();
      if (z[0] == ' ') --k;
      if (k > n) {
        cout << "Impossible";
        return 0;
      }
      if (z[0] == ' ') ++k;
      mas.push_back(z);
      z = "";
      res.push_back(k);
    }
  }
  int out = 0;
  int sum = 0;
  int j = 0;
  int k = 0;
  while (j < res.size()) {
    while (j < res.size() && sum <= n) {
      sum += res[j];
      ++j;
    }
    if (j < res.size() && mas[k][0] == ' ' && sum - 1 == n) {
      ++out;
      sum = 0;
      k = j;
      continue;
    }
    if (j < res.size()) {
      sum = res[j - 1];
      k = j - 1;
    }
    ++out;
  }
  if (mas[k][0] == ' ' && sum - 1 == n) {
    cout << out;
    return 0;
  }
  if (sum > n) ++out;
  cout << out;
  return 0;
}
