#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  if (n & 1) {
    printf("%d\n", 2 + (n - 3) * (n + 3) / 4);
    for (int k = 0; k < 2; k++) printf("3 1 2 3\n");
    for (int i = 5; i <= n; i += 2) {
      for (int k = 0; k < 2; k++) printf("3 %d %d 1\n", i, i - 1);
      for (int j = 3; j < i; j += 2)
        for (int k = 0; k < 2; k++)
          printf("4 %d %d %d %d\n", i, j, i - 1, j - 1);
    }
  } else {
    printf("%d\n", 4 + (n - 4) * (n + 4) / 4);
    printf("3 1 2 3\n");
    printf("3 1 2 4\n");
    printf("3 3 4 1\n");
    printf("3 3 4 2\n");
    for (int i = 6; i <= n; i += 2) {
      printf("3 %d %d 1\n", i, i - 1);
      printf("3 %d %d 2\n", i, i - 1);
      printf("4 %d 1 %d 2\n", i, i - 1);
      for (int j = 4; j < i; j += 2)
        for (int k = 0; k < 2; k++)
          printf("4 %d %d %d %d\n", i, j, i - 1, j - 1);
    }
  }
  return 0;
}
