N = int (input()); A = [0,1]; B = [0,1]; i = 2; while i <= N: a = A[i-1]+B[i-1]; A.append(a); B.append(A[i-1]); i = i+1; print(A[N]+B[N]);
System Design for Beginners
A masterclass that helps early engineers and product managers become great at designing scalable systems.
132+ learnersDetails →
System Design Masterclass
A masterclass that helps you become great at designing scalable, fault-tolerant, and highly available systems.
1000+ learnersDetails →
Learn internals of Redis by re-implementing some of the core features in Golang.
98+ learnersDetails →