#include <bits/stdc++.h>
using namespace std;
template <class T>
string toString(T n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
inline T Mod(T n, T m) {
  return (n % m + m) % m;
}
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / (__gcd(a, b)));
}
template <class T>
inline long long int toInt(T a) {
  long long int res;
  stringstream ss(a);
  ss >> res;
  return res;
}
template <typename T>
inline T euclide(T a, T b, T &x, T &y) {
  if (a < 0) {
    T d = euclide(-a, b, x, y);
    x = -x;
    return d;
  }
  if (b < 0) {
    T d = euclide(a, -b, x, y);
    y = -y;
    return d;
  }
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  } else {
    T d = euclide(b, a % b, x, y);
    T t = x;
    x = y;
    y = t - (a / b) * y;
    return d;
  }
}
int Set(int N, int pos) { return N = N | (1 << pos); }
int Reset(int N, int pos) { return N = N & ~(1 << pos); }
bool Check(int N, int pos) { return (bool)(N & (1 << pos)); }
long long int modPow(long long int a, long long int x, long long int p) {
  long long int res = 1;
  while (x > 0) {
    if (x & 1) res = (res * a) % p;
    a = (a * a) % p;
    x >>= 1;
  }
  return res;
}
long long int power(long long int a, long long int p) {
  long long int res = 1, x = a;
  while (p) {
    if (p & 1) res = res * x;
    x = x * x;
    p >>= 1;
  }
  return res;
}
long long int modInverse(long long int a, long long int p) {
  return modPow(a, p - 2, p);
}
long long int modBinomial(long long int n, long long int k, long long int p) {
  long long int numerator = 1;
  int i;
  for (i = 0; i < k; i++) numerator = (numerator * (n - i)) % p;
  long long int denominator = 1;
  for (i = 1; i <= k; i++) denominator = (denominator * i) % p;
  long long int res = modInverse(denominator, p);
  res = (res * numerator) % p;
  return res;
}
using namespace std;
char s[200001];
int n;
int main() {
  cin >> n;
  getchar();
  gets(s);
  long long int x = -1;
  long long int ans = 0;
  long long int _count = 0;
  for (int i = 0; i < strlen(s); i++) {
    if ((s[i] == '.') || (s[i] == '?') || (s[i] == '!')) {
      long long int len = i - x;
      if (len > n) {
        return printf("Impossible\n"), 0;
      }
      if (len + 1 <= _count)
        _count -= (len + 1);
      else {
        ans++;
        _count = n - len;
      }
      x = i + 1;
    }
  }
  cout << ans << endl;
  return 0;
}
