#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e9 + 7;
long long int int_pow(long long int base, long long int exp) {
  long long int result = 1;
  while (exp) {
    if (exp & 1) result *= base;
    exp /= 2;
    base *= base;
  }
  return result;
}
vector<long long int> v;
bool ender(char c) {
  if (c == '.' || c == '?' || c == '!') return 1;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, cnt = 0, ans = 0, sum = 0;
  cin >> n;
  string s;
  getline(cin, s), getline(cin, s);
  for (long long int i = 0; i < (long long int)s.length(); i++) {
    cnt++;
    if (ender(s[i])) {
      v.push_back(cnt);
      cnt = 0;
      i++;
    }
  }
  for (long long int i = 0; i < (long long int)v.size(); i++) {
    if (v[i] > n) {
      cout << "Impossible";
      return 0;
    }
  }
  cnt = 0;
  while (!v.empty()) {
    sum += v[0];
    cnt++;
    if (sum + (cnt - 1) == n) {
      sum = 0;
      cnt = 0;
      ans++;
      v.erase(v.begin());
      continue;
    }
    if (sum + (cnt - 1) > n) {
      sum = v[0];
      cnt = 1;
      ans++;
    }
    v.erase(v.begin());
  }
  if (sum != 0) ans++;
  cout << ans;
}
