t={1}exec'm=min(t);t=t-{m}|{2*m+1,3*m-1};'*input()print m
55
255
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!