fun luca(n:Int): Long {
  return (0..n).fold(Pair(0L,0L)) {sum,i ->
    when (i) {
      0 -> Pair(0L,2L)
      1 -> Pair(2L,1L)
      else -> Pair(sum.second,sum.second + sum.first)
    }
  }.second
}
fun main(args:Array<String>) {
  val N = readLine()!!.toInt()
  println(luca(N))
}
