#include <bits/stdc++.h>
using namespace std;
int ans, n, pnt;
string tex, mess, sen;
bool imp;
bool send() {
  if (mess.size() == 0 || mess.size() > n) return false;
  ans++;
  mess = "";
  return true;
}
bool readsen() {
  sen = "";
  while (pnt < tex.length() && tex[pnt] != '.' && tex[pnt] != '?' &&
         tex[pnt] != '!')
    sen += tex[pnt++];
  if (pnt < tex.size()) sen += tex[pnt++];
  return sen.length();
}
int main() {
  cin >> n;
  getline(cin, tex);
  getline(cin, tex);
  while (readsen() && !imp) {
    if (mess.size() + sen.size() <= n)
      mess += sen;
    else {
      imp = !send();
      while (sen.size() && sen[0] == ' ') sen.erase(0, 1);
      mess += sen;
    }
  }
  imp = imp || !send();
  if (imp)
    puts("Impossible\n");
  else
    cout << ans << endl;
  return 0;
}
