#include <bits/stdc++.h>
using namespace std;
int n, cnt = 1;
string s;
vector<int> v;
int main() {
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      if (cnt > n) {
        puts("Impossible");
        return 0;
      }
      v.push_back(cnt);
      i++;
      cnt = 0;
    }
    cnt++;
  }
  int count = 0, ans = 1;
  int leng = 0;
  for (int i = 0; i < v.size(); ++i) {
    leng += v[i] + 1;
    if (leng > n + 1) {
      ans++;
      leng = 0;
      i--;
    }
  }
  cout << ans << endl;
  return 0;
}
