#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[10009];
  cin.getline(s, 30);
  cin.getline(s, 10002);
  int l = 0, r = 0, m[10000], ml = 0, i, j;
  memset(m, 0, sizeof(m));
  for (i = 0; s[i]; ++i) {
    if (s[i] == '.' || s[i] == '!' || s[i] == '?') {
      m[ml++] = l + 1;
      l = 0;
      while (s[i + 1] == ' ') ++i;
    } else
      ++l;
  }
  for (i = 0; i < ml; i = j) {
    l = 0;
    for (j = i; j < ml; ++j) {
      l += m[j];
      if (l > n) break;
      ++l;
    }
    ++r;
    if (j == i) {
      cout << "Impossible";
      return 0;
    }
  }
  cout << r;
  return 0;
}
