object Main extends App {
	val N = scala.io.StdIn.readInt

	if(N == 0){
		println(2)
	}else if(N == 1){
		println(1)
	}else{
		val a = new Array[Long](N+1)
		a(0) = 2L
		a(1) = 1L

		for(i<-2 to N){
			a(i) = a(i-1) + a(i-2)
		}
		println(a(N))
	}

}
