#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  int text, front1 = 0, num = 0;
  cin >> text;
  string s;
  getline(cin, s);
  getline(cin, s);
  map<int, pair<string, int> > mp;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      mp[num].first = s.substr(front1, i - front1 + 1);
      mp[num].second = i - front1 + 1;
      if (mp[num].first.size() > text) {
        puts("Impossible");
        return 0;
      }
      front1 = i;
      front1 += 2;
      num++;
      i++;
    }
  }
  int lth = 0, ans = 1;
  for (int i = 0; i < num; i++) {
    lth += mp[i].second;
    lth++;
    if (lth - 1 > text) {
      lth = mp[i].second + 1;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
