#C14245. Fibonacci Sum

    ID: 43873 Type: Default 1000ms 256MiB

Fibonacci Sum

Fibonacci Sum

Given an integer (n), compute the sum (S(n)) of the first (n) Fibonacci numbers. The Fibonacci sequence is defined as (F_0=0), (F_1=1), and (F_n=F_{n-1}+F_{n-2}) for (n \geq 2). If (n \leq 0), then (S(n)=0). Read the input from standard input (stdin) and output the result to standard output (stdout).

inputFormat

The input consists of a single integer (n) provided on stdin.

outputFormat

Output a single integer which is the sum of the first (n) Fibonacci numbers, printed to stdout.## sample

0
0