#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INFMEM = 63;
const int INF = 1061109567;
const long long LINF = 4557430888798830399LL;
const double DINF = numeric_limits<double>::infinity();
const long long MOD = 1000000007;
const int dx[8] = {0, 0, 1, -1, 1, -1, 1, -1};
const int dy[8] = {1, -1, 0, 0, 1, -1, -1, 1};
const char dch[4] = {'R', 'L', 'D', 'U'};
const double PI = 3.141592653589793;
inline void open(string a) {
  freopen((a + ".in").c_str(), "r", stdin);
  freopen((a + ".out").c_str(), "w", stdout);
}
inline void fasterios() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long n;
bool isSpace(char ch) { return ch == ' '; }
bool isEnd(char ch) { return (ch == '.' || ch == '?' || ch == '!'); }
void cant() {
  cout << "Impossible" << '\n';
  exit(0);
}
int main() {
  vector<long long> ans;
  int cur = 0;
  cin >> n;
  getchar();
  string s;
  getline(cin, s);
  for (auto ch : s) {
    if (isSpace(ch) && cur)
      cur++;
    else if (!isSpace(ch))
      cur++;
    if (isEnd(ch)) {
      if (cur) ans.push_back(cur);
      cur = 0;
    }
  }
  int ansa = 0;
  int curLen = 0;
  for (auto isi : ans) {
    if (isi > n) cant();
    if (isi + curLen + (curLen != 0) > n) {
      ansa++;
      curLen = 0;
    }
    curLen += isi + (curLen != 0);
  }
  cout << ansa + 1 << '\n';
  return 0;
}
