import java.util.Scanner;
class Fibonacci
{
public static void main(String[] args)
{
int f1=0, f2=1;
int fib=0, count;
Scanner scn = new Scanner(System.in);
System.out.print("Enter the number of term: ");
int number = scn.nextInt();
System.out.println("First "+number+" number of Fabonacci series.");
for (count = 0;count < number ;count++ )
{
if (count <= 1)
{
fib = count;
}
else
{
fib = f1+f2;
f1 = f2;
f2 = fib;
}
System.out.print(fib+" ");
}
System.out.println("\n\n\n\n");
}
}