#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int n, k;
char s[10005];
int dp[10005];
vector<int> d;
void solution() {
  scanf("%d\n", &k);
  n = strlen(gets(s));
  for (int i = 0, _n = (n); i < _n; ++i) {
    int j = i;
    while (j + 1 < n && (s[j + 1] != '.' && s[j + 1] != '?' && s[j + 1] != '!'))
      j++;
    d.push_back(j - i + 2);
    if (d.back() > k) {
      puts("Impossible");
      return;
    }
    i = j + 2;
  }
  dp[0] = 0, n = (int)((d).size());
  for (int i = 1; i <= n; i++) {
    int sum = 0, ret = dp[i - 1] + 1;
    for (int j = i - 1; j >= 0; j--) {
      int nxt = sum + d[j] + (sum != 0);
      if (nxt <= k)
        sum = nxt, ret = min(ret, dp[j] + 1);
      else
        break;
    }
    dp[i] = ret;
  }
  cout << dp[n] << endl;
}
int main() {
  solution();
  return 0;
}
