#include <bits/stdc++.h>
using namespace std;
char s[10005];
int sen[10005];
int main() {
  int n, i, ans, se, j, total;
  while (~scanf("%d%*c", &n)) {
    gets(s);
    ans = 0;
    se = 0;
    total = 0;
    for (j = i = 0; s[i]; i++) {
      if (s[i] == '.' || s[i] == '!' || s[i] == '?')
        sen[se++] = i - j + 1, j = i + 2;
    }
    for (i = 0; i < se; i = j) {
      if (sen[i] > n) break;
      ans++;
      total = sen[i];
      for (j = i + 1; j < se && total + sen[j] + 1 <= n; j++)
        total = total + sen[j] + 1;
    }
    if (i < se)
      cout << "Impossible" << endl;
    else
      cout << ans << endl;
  }
  return 0;
}
