Advertisement
Josif_tepe

Untitled

Sep 18th, 2024
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.     int n;
  7.     cin >> n;
  8.     int x = (n * 2) / 3;
  9.     if(x % 2 == 1) {
  10.         x++;
  11.     }
  12.     cout << x << endl;
  13.    
  14.     return 0;
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement