SDE Path

First N Fibonacci Numbers

Easy

First N Fibonacci Numbers

Print the first N Fibonacci numbers using a rolling pair.

Input format

One line with an integer N (1 to 40).

Output format

Print the first N Fibonacci numbers starting from 0, space-separated (0, 1, 1, 2, 3, ...).

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
5
Expected output
0 1 1 2 3
Example 2
Input
1
Expected output
0