#include using namespace std; typedef long long ll; typedef string str; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n; cin >> n; if (n < 2) { if (n == 1) cout << 1; else cout << 0; } else { if (n % 2 == 1) cout << 1 + (n - 1) / 2; else cout << n / 2; } return 0; }