#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
string s;
int read() {
  int res = 0;
  cerr << "\n";
  while (cin >> s) {
    cerr << s << "_";
    res += s.size() + 1;
    if (s[s.size() - 1] == '.' || s[s.size() - 1] == '?' ||
        s[s.size() - 1] == '!')
      break;
  }
  if (!res) res = 1;
  return res - 1;
}
int n, m = 0, res = 0, k = 0;
int a[10100];
int main() {
  scanf("%d\n", &n);
  for (int f = read(); f; f = read(), m++) a[m] = f;
  for (int i = 0; i < m; i++) cerr << a[i] << " ";
  for (int i = 0; i < m; i++) {
    if (a[i] > n) {
      cout << "Impossible";
      return 0;
    }
    if (k + a[i] + (int)(k != 0) <= n) {
      k += a[i] + (int)(k != 0);
      continue;
    }
    res++;
    k = a[i];
  }
  if (k) res++;
  cout << res;
  return 0;
}
