#include <iostream>
using namespace std;
struct segtree {
int lb, rb;
int sum = 0;
segtree *l = 0, *r = 0;
segtree (int _lb, int _rb) {
lb = _lb, rb = _rb;
}
void extend () {
int t = (lb + rb) / 2;
if (!l) {
l = new segtree(lb, t);
r = new segtree(t+1, rb);
}
}
void add (int k, int x) {
sum += x;
if (lb != rb) {
extend();
int t = (lb + rb) / 2;
if (k <= t) l->add(k, x);
else r->add(k, x);
}
}
int get_sum (int lq, int rq) {
if (lb >= lq && rb <= rq) return sum;
if (lb > rq || rb < lq) return 0;
extend();
return l->get_sum(lq, rq) + r->get_sum(lq, rq);
}
};
int main() {
int n;
cin >> n;
int ans = 0;
segtree tree(0, 1e9);
const int k = 1e9 / n / 2;
for (int i = 0; i < n; ++i) {
ans += tree.get_sum(k * i, k * i + 1e9 / 2);
}
cout << ans << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IHNlZ3RyZWUgewogICAgaW50IGxiLCByYjsKICAgIGludCBzdW0gPSAwOwogICAgc2VndHJlZSAqbCA9IDAsICpyID0gMDsKICAgIHNlZ3RyZWUgKGludCBfbGIsIGludCBfcmIpIHsKICAgICAgICBsYiA9IF9sYiwgcmIgPSBfcmI7CiAgICB9CiAgICB2b2lkIGV4dGVuZCAoKSB7CiAgICAgICAgaW50IHQgPSAobGIgKyByYikgLyAyOwogICAgICAgIGlmICghbCkgewogICAgICAgICAgICBsID0gbmV3IHNlZ3RyZWUobGIsIHQpOwogICAgICAgICAgICByID0gbmV3IHNlZ3RyZWUodCsxLCByYik7CiAgICAgICAgfQogICAgfQogICAgdm9pZCBhZGQgKGludCBrLCBpbnQgeCkgewogICAgICAgIHN1bSArPSB4OwogICAgICAgIGlmIChsYiAhPSByYikgewogICAgICAgICAgICBleHRlbmQoKTsKICAgICAgICAgICAgaW50IHQgPSAobGIgKyByYikgLyAyOwogICAgICAgICAgICBpZiAoayA8PSB0KSBsLT5hZGQoaywgeCk7CiAgICAgICAgICAgIGVsc2Ugci0+YWRkKGssIHgpOwogICAgICAgIH0KICAgIH0KICAgIGludCBnZXRfc3VtIChpbnQgbHEsIGludCBycSkgewogICAgICAgIGlmIChsYiA+PSBscSAmJiByYiA8PSBycSkgcmV0dXJuIHN1bTsKICAgICAgICBpZiAobGIgPiBycSB8fCByYiA8IGxxKSByZXR1cm4gMDsKICAgICAgICBleHRlbmQoKTsKICAgICAgICByZXR1cm4gbC0+Z2V0X3N1bShscSwgcnEpICsgci0+Z2V0X3N1bShscSwgcnEpOwogICAgfQp9OwppbnQgbWFpbigpIHsKICAgIGludCBuOwogICAgY2luID4+IG47CiAgICBpbnQgYW5zID0gMDsKICAgIHNlZ3RyZWUgdHJlZSgwLCAxZTkpOwogICAgY29uc3QgaW50IGsgPSAxZTkgLyBuIC8gMjsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgKytpKSB7CiAgICAgICAgYW5zICs9IHRyZWUuZ2V0X3N1bShrICogaSwgayAqIGkgKyAxZTkgLyAyKTsKICAgIH0KICAgIGNvdXQgPDwgYW5zIDw8IGVuZGw7CiAgICByZXR1cm4gMDsKfQoKCg==