#include <bits/stdc++.h>
using namespace std;
string s;
int len;
struct Sen {
  string S;
  int Len;
} a[10004];
int pl;
int cnt;
int n;
int main() {
  cin >> n;
  getline(cin, s);
  getline(cin, s);
  len = s.size();
  for (int i = 0; i < len; i++) {
    if (s[i] == '.' || s[i] == '?' || s[i] == '!') {
      string ts = s.substr(pl, i - pl + 1);
      pl = i + 2;
      cnt++;
      a[cnt].S = ts;
      a[cnt].Len = ts.size();
    }
  }
  int Left = n;
  int ans = 1;
  for (int i = 1; i <= cnt; i++) {
    if (a[i].Len > n) {
      cout << "Impossible";
      return 0;
    }
    if (Left == n) {
      Left -= a[i].Len;
    } else if (Left - 1 >= a[i].Len) {
      Left -= a[i].Len + 1;
    } else {
      ans++;
      Left = n - a[i].Len;
    }
  }
  cout << ans;
  return 0;
}
