#include <bits/stdc++.h>
using namespace std;
long long const mod = 1000000007;
long long const md = 998244353;
long long mypowr(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long mypow(long long a, long long b) {
  long long res = 1;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a;
    a = a * a;
  }
  return res;
}
ifstream in("txt.in");
ofstream out("txt.out");
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(15);
  long long n;
  cin >> n;
  long long space = n;
  string s;
  getline(cin, s);
  getline(cin, s);
  long long cnt = 1;
  int u = s.size();
  for (int i = 0; i < u; ++i) {
    int sum = 0;
    int pos = i;
    while (s[pos] != '.' && s[pos] != '?' && s[pos] != '!' && pos < u) {
      ++sum;
      ++pos;
    }
    ++sum;
    if ((sum > n && i == 0) || (sum > n + 1)) {
      cout << "Impossible";
      exit(0);
    }
    if (space >= sum) {
      space -= sum;
    } else {
      ++cnt;
      space = n;
      space = space - sum + 1;
    }
    i = pos;
  }
  cout << cnt << '\n';
  return 0;
}
