#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string line;
  getline(cin, line);
  getline(cin, line);
  vector<string> lines;
  int c = 0;
  for (int i = (0); i < (int((line).size())); ++i) {
    if (line[i] == '.' || line[i] == '?' || line[i] == '!') {
      lines.push_back(line.substr(c, i - c + 1));
      c = i + 2;
    }
  }
  for (int i = (0); i < (int((lines).size())); ++i) {
    if (int((lines[i]).size()) > n) {
      cout << "Impossible" << endl;
      return 0;
    }
  }
  int sum = 0;
  int i = 0;
  while (i < int((lines).size())) {
    int c = 0;
    for (int j = (i); j < (int((lines).size())); ++j) {
      c += lines[j].size();
      if (c > n) {
        i = j;
        break;
      } else {
        i++;
        c++;
      }
    }
    sum++;
  }
  cout << sum << endl;
  return 0;
}
