/** Fibo.java - Printing Fibonaci numbers (remember, it is the
                sequence 1, 1, 2, 3, 5, 8, 13, ...
  */

import java.io.*;

public class Fibo 
{
    /** Prompt user for a value of n, then
        print n Fibonacci numbers
      */
    public static void main(String[] args) throws IOException {
	BufferedReader rd = new BufferedReader (
		new InputStreamReader(System.in));
	System.out.print("Enter value of n: ");
	String ns = rd.readLine();
	int n = Integer.parseInt(ns);
	int p = 0, c = 1, a;
	while (n-- > 0) {
	    System.out.println(c);
	    a = p + c;
	    p = c;
	    c = a;
        }
    }
}
