#include <stdio.h>

main()
{
  int n, lastx, x, y, seg, com;
  float r2;

  while( scanf("%d", &n) == 1 ) {

    r2 = (n - 0.5) * (n - 0.5);
    lastx = x = 0;
    y = n;
    seg = com = 0;

    while(1) {
      if ( x * x + y * y < r2 ) {
	if ( lastx != x && x > 0 )
	  com += y;
	lastx = x;
	x++;
	seg++;
      } else {
	if ( x > 0 )
	  x--;
	y--;
      }

      if ( y < 0 )
	break;
    }

    printf("In the case n = %d, %d cells contain segments of the circle.\n", n, seg * 4);
    printf("There are %d cells completely contained in the circle.\n\n", com * 4);
  }
}
