#include <bits/stdc++.h>
int main() {
  char text[10005];
  int r;
  scanf("%d", &r);
  gets(text);
  gets(text);
  int len = strlen(text);
  int now = 0, ans = 0, bfLen = 0, state = 0, nLen = 0, nSpace = 0;
  while (now < len) {
    if (state == 1) {
      if (text[now] != ' ')
        state = 0;
      else
        nSpace++;
    }
    if (state == 0) {
      nLen++;
      if (nLen > r) {
        printf("Impossible\n");
        return 0;
      }
      if (text[now] == '?' || text[now] == '!' || text[now] == '.') {
        if (bfLen + nLen + nSpace > r) {
          ans++;
          bfLen = nLen;
        } else
          bfLen += nLen + nSpace;
        nLen = 0;
        state = 1;
        nSpace = 0;
      }
    }
    now++;
  }
  ans++;
  printf("%d\n", ans);
}
