#include <bits/stdc++.h>
using namespace std;
int n, type, size[10000];
string s, s1;
void fin() {
  cout << "Impossible";
  exit(0);
}
int f(int i) {
  if (i == 0)
    return 0;
  else
    return 1;
}
int main() {
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  int ans = 1;
  int cursize = 0;
  int cur = 0;
  for (int i = 0; i < s.length(); i++) {
    cursize++;
    if (s[i] <= 'Z' && s[i] >= 'A') type = 0;
    if (s[i] <= 'z' && s[i] >= 'a') type = 0;
    if (s[i] == ' ') type = 1;
    if (s[i] == '!' || s[i] == '?' || s[i] == '.') {
      cur++;
      cursize = -1;
    }
    size[cur] = cursize + 1;
  }
  int now = 0;
  for (int i = 0; i < cur; i++) {
    if (now + size[i] + f(now) > n) {
      ans++;
      now = size[i];
    } else
      now += (size[i] + f(now));
    if (size[i] > n) fin();
  }
  cout << ans;
}
