Option Explicit
Function f(n As Integer) As Long
If n = 1 Then
f = 1
ElseIf n = 2 Then
f = 1
Else
f = f(n - 2) + f(n - 1)
End If
End Function
Sub command1_click()
Dim n As Integer
Dim s As Long
Dim i As Integer
n = InputBox("")
For i = 1 To n
s = s + f(i)
Next
Print s
End Su