Advertisement
sentique

Untitled

Oct 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. n = int(input())
  2. k = 0
  3. s = 0
  4. while k < n:
  5. if not s % 2:
  6. k += 1
  7. s +=1
  8. else:
  9. k += 2
  10. s +=1
  11. if not n % 3:
  12. print(s+1)
  13. else:
  14. print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement