#include <bits/stdc++.h>
using namespace std;
int n;
string tmp, s;
vector<string> v;
int main() {
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    tmp += s[i];
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      v.push_back(tmp);
      i++;
      tmp = "";
    }
  }
  int sum = 0, ans = 0;
  bool ok = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].size() > n) {
      cout << "Impossible";
      return 0;
    }
    int f = v[i].size();
    if (sum) f++;
    if (sum + f > n) {
      ans++;
      sum = 0;
      i--;
    } else
      sum += f;
  }
  if (sum != 0) ans++;
  cout << ans;
  return 0;
}
