#include <bits/stdc++.h>
using namespace std;
string str;
int s[50000];
int top = 0;
int main() {
  int len;
  cin >> len;
  getline(cin, str);
  getline(cin, str);
  int i = 0;
  int last = 0;
  while (i < str.size()) {
    if (str[i] == '.' || str[i] == '?' || str[i] == '!') {
      s[++top] = i - last + 1;
      if (s[top] > len) {
        cout << "Impossible" << endl;
        return 0;
      }
      last = ++i + 1;
    }
    i++;
  }
  int ans = 0;
  i = 1;
  while (i <= top) {
    int tmp = s[i++];
    while (tmp + s[i] + 1 <= len) {
      tmp += s[i] + 1;
      if (++i > top) break;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}
