#include <bits/stdc++.h>
using namespace std;
int a[300];
int main() {
  int n;
  string s;
  cin >> n;
  cin.ignore();
  getline(cin, s);
  int sum = 0;
  int r = 0, f = 0, k = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.' || s[i] == '!' || s[i] == '?') {
      r++;
      if (r <= n) {
        if (f - 1 >= 0 && a[f - 1] + r + k <= n) {
          a[f - 1] += r + k;
        } else {
          a[f] = r;
          k = 0;
          f++;
          sum++;
        }
      } else
        return cout << "Impossible", 0;
      r = 0;
    } else if (s[i] == ' ') {
      if (r != 0) r++;
      if (r == 0) {
        k = 1;
      }
    } else {
      r++;
    }
  }
  cout << sum;
}
