#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define req(i,n) for(int i = 1;i <= n; i++) #define rrep(i,n) for(ll i = n-1;i >= 0;i--) #define ALL(obj) begin(obj), end(obj) #define RALL(a) rbegin(a),rend(a) typedef long long ll; typedef long double ld; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e18; const int inf = 0x3fffffff; using Real = ld; using Point = complex< Real >; const Real EPS = 1e-8, PI = acos(-1); inline bool eq(Real a, Real b) { return fabs(b - a) < EPS; } Point operator*(const Point& p, const Real& d) { return Point(real(p) * d, imag(p) * d); } istream& operator>>(istream& is, Point& p) { Real a, b; is >> a >> b; p = Point(a, b); return is; } ostream& operator<<(ostream& os, Point& p) { return os << fixed << setprecision(10) << p.real() << " " << p.imag(); } // 点 p を反時計回りに theta 回転 Point rotate(Real theta, const Point& p) { return Point(cos(theta) * p.real() - sin(theta) * p.imag(), sin(theta) * p.real() + cos(theta) * p.imag()); } namespace std { bool operator<(const Point& a, const Point& b) { return a.real() != b.real() ? a.real() < b.real() : a.imag() < b.imag(); } } using Points = vector< Point >; using Polygon = vector< Point >; Real cross(const Point& a, const Point& b) { return real(a) * imag(b) - imag(a) * real(b); } Real area(const Polygon& p) { Real A = 0; for (int i = 0; i < p.size(); ++i) { A += cross(p[i], p[(i + 1) % p.size()]); }return A * 0.5; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; ll ans = 0; vector x(n), y(n); rep(i, n) cin >> x[i] >> y[i]; rep(i, n) { ans += x[i] * y[(i + 1) % n] - y[i] * x[(i + 1) % n]; }cout << ans << endl; }