#include <bits/stdc++.h>
using namespace std;
const int INF = (1LL << 31) - 1;
vector<int> p, c;
string t;
int n;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n;
  cin.ignore();
  getline(cin, t);
  int x = 0;
  while (x < t.size()) {
    p.push_back(0);
    while (t[x] != '.' && t[x] != '!' && t[x] != '?') x++, p.back()++;
    p.back()++;
    if (p.back() > n) return cout << "Impossible" << endl, 0;
    x += 2;
  }
  x = 0;
  while (x < p.size()) {
    c.push_back(p[x]), x++;
    while (c.back() + p[x] + 1 <= n && x < p.size()) c.back() += p[x] + 1, x++;
  }
  cout << c.size() << endl;
}
