#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000003;
long long ans(int n) {
  if (n == 1) return 1;
  return (3 * ans(n - 1)) % MOD;
}
vector<string> s;
int main() {
  int n;
  cin >> n;
  string str;
  getline(cin, str);
  getline(cin, str);
  string curStr;
  bool was = false;
  for (int i = 0; i < str.size(); i++) {
    if (str[i] == ' ' && i > 0 && was) {
      was = false;
      continue;
    }
    curStr.push_back(str[i]);
    if (str[i] == '.' || str[i] == '!' || str[i] == '?') {
      s.push_back(curStr);
      if (curStr.size() > n) {
        cout << "Impossible" << endl;
        return 0;
      }
      was = true;
      curStr = "";
    }
  }
  int cur = 0;
  curStr = "";
  int sum = 0;
  for (int i = 0; i < s.size(); i++) {
    if (cur == 0)
      cur += s[i].size();
    else
      cur += s[i].size() + 1;
    if (cur > n) {
      sum++;
      cur = 0;
      --i;
    }
  }
  if (cur != 0) ++sum;
  cout << sum << endl;
  return 0;
}
