var dic = [Int:Int64]()
let goal = Int(readLine()!)!

func getAns(idx:Int) -> Int64 {
    if goal - idx == 1 {
        return 1
    }
    if goal - idx == 2 {
        return 2
    }

    if let dp = dic[idx] {
        return dp
    }

    let ans = getAns(idx: idx+2) + getAns(idx: idx+1)

    dic[idx] = ans
    return ans
}

let ans = getAns(idx: 0)
print(ans)