N=gets.to_i DP=Array.new(N+2,0) DP[0]=1 for i in 0...N DP[i+1]+=DP[i] DP[i+2]+=DP[i] end puts DP[N]