#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char c;
  cin >> n >> c;
  int l = 2, r = n, ans = 1;
  while (cin.get(c)) {
    l++;
    if (c == '.' || c == '!' || c == '?') {
      if (l - 1 > n) {
        cout << "Impossible";
        return 0;
      } else if (r == n)
        r -= l - 1;
      else if (l <= r)
        r -= l;
      else {
        r = n - (l - 1);
        ans++;
      }
      l = 0;
    }
  }
  cout << ans << endl;
}
