n = io.read("*n") p= {} p[1] = 1 p[2] = 2 if (n==1) then io.write(1) else for i = 3, n, 1 do p[1], p[2] = p[2], p[1] + p[2] end io.write(p[2]) end