#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, num = 0;
  int length = 0;
  int flag = 0;
  int sum = 0;
  int greedy = 0;
  string s, sen;
  cout << s;
  string ss[10000];
  string sentence[10000];
  int count[10000];
  memset(count, 0, sizeof(count));
  cin >> n;
  getchar();
  getline(cin, s);
  stringstream fin(s);
  while (fin >> ss[num]) {
    int len = ss[num].length();
    if (ss[num][len - 1] == '.' || ss[num][len - 1] == '?' ||
        ss[num][len - 1] == '!') {
      count[num] = 1;
    }
    num++;
  }
  for (int i = 0; i < num; i++) {
    length += ss[i].length();
    if (count[i] == 1) {
      if (length > n) {
        cout << "Impossible" << endl;
        return 0;
      } else {
        if (i == 0) {
          sen = ss[i];
          sentence[sum++] = sen;
          length = 0;
          string a;
          sen = a;
          flag = 1;
        } else {
          if (flag == 1) {
            sen = sen + ss[i];
            sentence[sum++] = sen;
            length = 0;
            string a;
            sen = a;
            flag = 1;
          } else {
            sen = sen + ' ' + ss[i];
            sentence[sum++] = sen;
            length = 0;
            string a;
            sen = a;
            flag = 1;
          }
        }
      }
    } else {
      if (flag == 1) {
        sen = sen + ss[i];
        flag = 0;
      } else {
        if (i == 0)
          sen = ss[i];
        else {
          sen = sen + ' ' + ss[i];
          length += 1;
        }
      }
    }
  }
  for (int i = 0, l = 0; i < sum; i++) {
    l += sentence[i].length();
    if (i != 0) l += 1;
    if (l > n) {
      greedy += 1;
      l = sentence[i].length();
    }
  }
  cout << greedy + 1 << endl;
}
