#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
int main() {
  if (fopen("data.in", "r")) freopen("data.in", "r", stdin);
  int N, cnt = 0, prv = 0;
  string txt;
  char ch;
  scanf("%d", &N);
  scanf("%c", &ch);
  while (~scanf("%c", &ch) && ch != '\n') txt += ch;
  for (int i = 0; i < (int)txt.size(); i++) {
    int a = txt.find(".", i);
    int b = txt.find("?", i);
    int c = txt.find("!", i);
    a = a > 0 ? a : (1 << 29) + 123;
    b = b > 0 ? b : (1 << 29) + 123;
    c = c > 0 ? c : (1 << 29) + 123;
    int nxt = min(a, min(b, c));
    if (prv + nxt - i + 1 + (prv > 0) <= N)
      prv += nxt - i + 1 + (prv > 0);
    else if (nxt - i + 1 <= N)
      prv = nxt - i + 1, cnt++;
    else {
      printf("Impossible\n");
      return 0;
    }
    i = nxt + 1;
  }
  printf("%d\n", cnt + 1);
  return 0;
}
