#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int main() {
  bool f = false;
  string str;
  int n, now = -1, pos = 0, res = 1;
  cin >> n;
  cin.ignore();
  getline(cin, str, '\n');
  while ((pos = str.find_first_of(".?!", pos)) != string::npos) {
    arr.push_back(pos - now);
    now = pos + 1;
    pos += 2;
  }
  arr.push_back(str.length() - now - 1);
  now = -1;
  for (auto x : arr) {
    if (x > n) {
      f = true;
      break;
    } else if (now + x + 1 > n) {
      res++;
      now = x;
    } else
      now += x + 1;
  }
  if (f)
    cout << "Impossible" << endl;
  else
    cout << res << endl;
  return 0;
}
