#include <bits/stdc++.h>
using namespace std;
char buf[20000];
bool ending[256];
int main() {
  for (int i = 0; i < (256); i++) ending[i] = false;
  ending['.'] = ending['!'] = ending['?'] = true;
  int N;
  scanf("%d\n", &N);
  gets(buf);
  int K = 0;
  while (buf[K] != '\r' && buf[K] != '\n' && buf[K] != 0) K++;
  buf[K++] = ' ';
  int count = 1;
  int current = 0;
  int i = 0;
  while (i < K) {
    int c = 0;
    while (!ending[buf[i]]) {
      i++;
      c++;
    }
    i++;
    c++;
    if (current + c <= N) {
      current += c;
    } else if (c > N) {
      printf("Impossible\n");
      return 0;
    } else {
      current = c;
      count++;
    }
    i++;
    current++;
  }
  printf("%d\n", count);
}
