import javax.swing.*; 
import java.awt.*; 
import java.util.*;

class Program extends JFrame {
  Program(int number) {
    Screen a = new Screen(number); 
    this.add( a ); 
    this.setSize(400, 400); 
    this.setVisible( true ); 
    this.setDefaultCloseOperation( EXIT_ON_CLOSE ); 
  } 
  public static void main(String[] args) {
    int number = Integer.parseInt( args[0] ); 
    Program a; 
    a = new Program(number);     
  }
}

class Circle {
  Color c; 
  int x, y, radius;
  Circle(int x, int y, int r, Color c) {
    this.x = x; 
    this.y = y; 
    this.radius = r;
    this.c = c;  
  }
  void draw(Graphics g) {
    g.setColor(this.c);
    g.fillOval(this.x, this.y, 2 * this.radius, 2 * this.radius); 
    g.setColor(Color.BLACK);
    g.drawOval(this.x, this.y, 2 * this.radius, 2 * this.radius); 
  }   
}

class Screen extends JComponent {
  int count = 0; 
  ArrayList<Circle> circles; 
  Screen(int number) {
    circles = new ArrayList<Circle>(); 
    for (int i = 0; i < number; i++) {
      // (int)(Math.random() * 300) + 50
      this.circles.add(new Circle( (int)(Math.random() * 300) + 50 ,
                                   (int)(Math.random() * 300) + 50 ,
                                   20 + (int)(Math.random() * 50),  

                                   new Color( (float)(Math.random()), 
                                              (float)(Math.random()), 
                                              (float)(Math.random()) 
                                            )
                                  ) 
                       ); 
    }    
  }
  public void paintComponent(Graphics g) {
    this.count += 1; 
    System.out.println( "Bonjour: " + this.count );     
    for (Circle c : this.circles) {
      c.draw(g); 
    } 
  }  
}